Author Topic: Yum Manager and # yum update failing to update Maria SQL  (Read 18963 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Yum Manager and # yum update failing to update Maria SQL
« on: October 29, 2018, 05:35:35 AM »
Hi When I use Yum Manager in pro version it does not update the latest MariaDB-server.x86_64

Also if I run *Yum update in SSH, I get this error :

error: %pre(MariaDB-server-10.2.18-1.el7.centos.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package MariaDB-server-10.2.18-1.el7.centos.x86_64
MariaDB-server-10.1.36-1.el7.centos.x86_64 was supposed to be removed but is not!
  Verifying  : MariaDB-server-10.1.36-1.el7.centos.x86_64                   1/2
  Verifying  : MariaDB-server-10.2.18-1.el7.centos.x86_64                   2/2

Failed:
  MariaDB-server.x86_64 0:10.1.36-1.el7.centos
  MariaDB-server.x86_64 0:10.2.18-1.el7.centos

Complete!

Is anyone else having this issue?

Greets


Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #1 on: October 29, 2018, 07:26:22 AM »
..me too
+1

Offline
*****
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #2 on: October 29, 2018, 11:34:41 AM »
Hi, that's weird.
How exactly was installed MariaDB before? I couldn't reproduce it with my server.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #3 on: October 29, 2018, 03:21:26 PM »
with the installation of the CWP package...

Offline
*
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #4 on: October 29, 2018, 04:02:38 PM »
Happening on 2 of my VPS's.

Offline
*****
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #5 on: October 29, 2018, 05:39:44 PM »
That's weird.
It will be investigated.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #6 on: October 30, 2018, 12:30:53 AM »
That's weird.
It will be investigated.

Thank you kind support.

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #7 on: October 31, 2018, 02:37:42 AM »
The update of MariaDB from version 10.1.36-1 to 10.2.18-1 is a major update, and must have be done manually.
This update introduced some differences on behavior of "default" fields of my tables, that you have caution to update.

Follow the procedure descripted at:
https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102/

(Adapted to CentOS)
1) Set innodb_fast_shutdown to 0 (this step is not necessary when upgrading to MariaDB 10.2.5 or later - omitting it can make the upgrade process far faster - see MDEV-12289).

2) Execute: yum update (enter 'yes', to update all packges as possible)
    (Possibly the only one package not updated is 'MariaDB-server-10.2.18-1')

3) Take a backup (this is the perfect time to take a backup of your databases)
CAUTION: Believe me. Do backups right now by dumping them due that differences pointed. Be advised!

4) Uninstall MariaDB-server-10.1.36-1. Execute:
    yum remove MariaDB-server-10.1.36-1

5) Install MariaDB-server-10.2.18-1
    yum install MariaDB-server-10.2.18-1
    (or to install all other packages: yum install MariaDB*)

6) Run: mysql_upgrade

mysql_upgrade does two things:
- Upgrades the permission tables in the mysql database with some new fields
- Does a very quick check of all tables and marks them as compatible with MariaDB 10.2
In most cases this should be a fast operation (depending of course on the number of tables)

7) Add new options to my.cnf to enable features

If you change my.cnf then you need to restart mariadb

Regards,
Netino
« Last Edit: October 31, 2018, 02:47:54 AM by Netino »

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #8 on: November 03, 2018, 04:50:05 AM »
The update of MariaDB from version 10.1.36-1 to 10.2.18-1 is a major update, and must have be done manually.
This update introduced some differences on behavior of "default" fields of my tables, that you have caution to update.

Follow the procedure descripted at:
https://mariadb.com/kb/en/library/upgr.....

Regards,
Netino

try to install it manually or expect an automatic script ?!?

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #9 on: January 04, 2020, 11:09:01 PM »
The upgrade is essentially manually installed, and I would not wait to a automated script, for the moment.

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #10 on: January 04, 2020, 11:10:15 PM »
You can have a problem with systemd daemon, being MySQL service pointed at CWP Dashboard as "No Active".
Checking for "mariadb" service after install, you find nothing.
Seeking for mysql service, you find:
Code: [Select]
# systemctl | grep -i mysql
  mysql.service                                                 loaded active running   LSB: start and stop MariaDB

Checking for the unit existence, you find:
Code: [Select]
# ls -alF /usr/lib/systemd/system/mariadb.service* /usr/share/mysql/systemd/mariadb.service /etc/rc.d/init.d/mysql*
-rwxr-xr-x 1 root root 12192 Dez  4 20:38 /etc/rc.d/init.d/mysql*
lrwxrwxrwx 1 root root    17 Jun 17  2018 /etc/rc.d/init.d/mysqld -> /etc/init.d/mysql*
-rw-r--r-- 1 root root  5157 Dez  4 20:38 /usr/lib/systemd/system/mariadb.service
-rw-r--r-- 1 root root  4513 Out 29  2018 /usr/lib/systemd/system/mariadb.service.rpmsave
-rw-r--r-- 1 root root  5157 Dez  4 20:38 /usr/share/mysql/systemd/mariadb.service

Checking for MySQL with systemctl command:
Code: [Select]
# systemctl status mysql --no-pager
● mysql.service - LSB: start and stop MariaDB
   Loaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)
   Active: active (running) since Sáb 2020-01-04 03:33:10 -03; 16h ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/mysql.service
           ├─8050 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/painel.edeaas.com.br.pid
           └─8120 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err

# systemctl status mysqld --no-pager
● mysqld.service - LSB: start and stop MariaDB
   Loaded: loaded (/etc/rc.d/init.d/mysqld; bad; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

For some strange reason, the manual upgrade MariaDB's installation does't auto enable the unit at systemd.
So, to resolve the CWP Dashboard problem, you simply enable mariadb:
Code: [Select]
# systemctl enable mariadb
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

Checking for the solution:
Code: [Select]
# systemctl status mysql --no-pager
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) (Result: exit-code) since Sáb 2020-01-04 03:33:10 -03; 16h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
   CGroup: /system.slice/mysql.service
           ├─8050 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/painel.edeaas.com.br.pid
           └─8120 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err

# systemctl status mysqld --no-pager
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) (Result: exit-code) since Sáb 2020-01-04 03:33:10 -03; 16h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
   CGroup: /system.slice/mysql.service
           ├─8050 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/painel.edeaas.com.br.pid
           └─8120 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err

# systemctl status mariadb --no-pager
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) (Result: exit-code) since Sáb 2020-01-04 03:33:10 -03; 16h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
   CGroup: /system.slice/mysql.service
           ├─8050 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/painel.edeaas.com.br.pid
           └─8120 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err


# systemctl status mysql --no-pager
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) (Result: exit-code) since Sáb 2020-01-04 03:33:10 -03; 16h ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
   CGroup: /system.slice/mysql.service
           ├─8050 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/painel.edeaas.com.br.pid
           └─8120 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/hostname.err

Regards,
Netino

Offline
***
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #11 on: January 06, 2020, 03:03:16 AM »
I'm using OpenVZ7. So, when restart the MariaDB server with above trick, it fails to restart the MariaDB server.

Code: [Select]
# systemctl restart mariadb
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

# systemctl -l status mariadb
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─dontprotecthome.conf, limitnofile.conf, migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Dom 2020-01-05 19:10:02 -03; 2s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 3081 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=201/NICE)

Jan 05 19:10:02 painel.edeaas.com.br systemd[1]: Starting MariaDB 10.2.30 database server...
Jan 05 19:10:02 painel.edeaas.com.br systemd[3081]: Failed at step NICE spawning /bin/sh: Permission denied
Jan 05 19:10:02 painel.edeaas.com.br systemd[1]: mariadb.service: control process exited, code=exited status=201
Jan 05 19:10:02 painel.edeaas.com.br systemd[1]: Failed to start MariaDB 10.2.30 database server.
Jan 05 19:10:02 painel.edeaas.com.br systemd[1]: Unit mariadb.service entered failed state.
Jan 05 19:10:02 painel.edeaas.com.br systemd[1]: mariadb.service failed.

Running "systemctl disable mysql" didn't solved the problem.
When upgraded MariaDB, I see was created a file "/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf":
Code: [Select]
# converted using /usr/bin/mariadb-service-convert
#

[Service]
Nice=-5

For some reason, I cannot do nice/renice of processes priorities in OpenVZ7, although being root user.
I searched google, but could't find anything to solve this problem.
So, commenting the "Nice" parameter, and solved the problem.
Code: [Select]
# converted using /usr/bin/mariadb-service-convert
#

#[Service]
#Nice=-5

# systemctl -l status mariadb
● mariadb.service - MariaDB 10.2.30 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Dom 2020-01-05 20:16:38 -03; 2h 51min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 9559 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 9441 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 9440 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 9527 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─9527 /usr/sbin/mysqld --basedir=/usr

I tried too to add "DefaultLimitNICE:-5:-5" to /etc/systemd/system.conf, but the problem persists.
But strangely, I can use "renice" the running processes by changing the process priority with "htop" tool (need to install it).
Seems a problem with sh/bash.

Regards,
Netino

Offline
*
Re: Yum Manager and # yum update failing to update Maria SQL
« Reply #12 on: March 21, 2021, 12:19:05 PM »
For some strange reason, the manual upgrade MariaDB's installation does't auto enable the unit at systemd.
So, to resolve the CWP Dashboard problem, you simply enable mariadb:
Code: [Select]
# systemctl enable mariadb
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[/quote]

Works for me, thanks!