Problem with MariaDB after update to version 10.4.12

id14

Verified User
Joined
Aug 3, 2019
Messages
27
After I did update MariaDB to 10.4.12 I noticed errors during the nightly backups.

Code:
Error while backing up database database_name
mysqldump error output: mysqldump: Couldn't execute 'show fields from `bookings`': Can't create/write to file '/tmp/#sql_4a3a_0.MAI' (Errcode: 2 "No such file or directory") (1)

I tried to restart MariaDB but it did not restart and after :
systemctl status mariadb.service I got :

Code:
 systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/etc/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Fri 2020-01-31 13:02:41 CET; 45s ago
  Process: 7982 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 7968 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] &&   systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 7966 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 7982 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
   CGroup: /system.slice/mariadb.service
           └─19002 /usr/sbin/mysqld

mysqld[7982]: 2020-01-31 13:02:41 0 [ERROR] Plugin 'InnoDB' init function returned error.
mysqld[7982]: 2020-01-31 13:02:41 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysqld[7982]: 2020-01-31 13:02:41 0 [Note] Plugin 'FEEDBACK' is disabled.
mysqld[7982]: 2020-01-31 13:02:41 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
mysqld[7982]: 2020-01-31 13:02:41 0 [ERROR] Failed to initialize plugins.
mysqld[7982]: 2020-01-31 13:02:41 0 [ERROR] Aborting
systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start MariaDB database server.
systemd[1]: Unit mariadb.service entered failed state.
systemd[1]: mariadb.service failed.

The strange thing is MariaDB is in fact still running and sites with databases are still working.
Any idea what the cause could be and how to fix this?

Thanks in advance
 
Could it be that your disk is full? Otherwise your /tmp might have incorrect permissions set.
 
Thanks for the quick reply it is appreciated.

Disk isn't full , what should be the permissions of the /tmp ?
I did chmod 1777 /tmp but it did not solve the problem

Code:
service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[root@srv3 ~]# journalctl -xe
mysqld[19237]: 2020-01-31 13:48:56 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
mysqld[19237]: 2020-01-31 13:48:57 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11

Code:
systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/etc/systemd/system/mariadb.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Fri 2020-01-31 13:49:07 CET; 4min 8s ago
  Process: 19237 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 19223 ExecStartPre=/bin/sh -c [ -x /usr/bin/galera_recovery ] || exit 0; VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] &&   systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 19221 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 19237 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"
   CGroup: /system.slice/mariadb.service
           └─19002 /usr/sbin/mysqld

mysqld[19237]: 2020-01-31 13:49:07 0 [Note] Plugin 'FEEDBACK' is disabled.
mysqld[19237]: 2020-01-31 13:49:07 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
mysqld[19237]: 2020-01-31 13:49:07 0 [ERROR] Failed to initialize plugins.
mysqld[19237]: 2020-01-31 13:49:07 0 [ERROR] Aborting
systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start MariaDB database server.
systemd[1]: Unit mariadb.service entered failed state.
systemd[1]: mariadb.service failed.
mysqld[19002]: 2020-01-31 13:50:05 46047 [Warning] Access denied for user 'root'@'localhost' (using password: YES)
mysqld[19002]: 2020-01-31 13:53:10 46084 [Warning] Access denied for user 'admin'@'localhost' (using password: YES)

Any other ideas?
 
mysqld[19237]: 2020-01-31 13:48:56 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. mysqld[19237]: 2020-01-31 13:48:57 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11

That's a different error, meaning MySQL is already started up. Check:
Code:
ps auxwf | grep mysql
 
Output is :

Code:
[root@srv3 ~]# ps auxwf | grep mysql
root     23366  0.0  0.0 110692   908 pts/0    S+   14:08   0:00          \_ grep --color=auto mysql
mysql    19002  0.6  4.2 1773308 165708 ?      Ssl  Jan30   8:48 /usr/sbin/mysqld
 
I’m not sure how you got the mysqld service there then :) Try:
Code:
kill 19002

And check the processlist again after 15secs or so to see if the process is still there.
 
Thanks killed the process then started Mariadb again and now it seems to work correctly again will try the backup again to see if that error is solved now too.

These means the old MariaDB was corrupt or something after the update, still working for the websites but unable to restart?
 
Thanks killed the process then started Mariadb again and now it seems to work correctly again will try the backup again to see if that error is solved now too.

These means the old MariaDB was corrupt or something after the update, still working for the websites but unable to restart?
I am not sure why you had the process started not through the systemd. If you restored backup from command line, maybe you wrote mysqld instead of mysql in the command line?
 
It started when I noticed an errors during the automatic nightly backups with the databases of all the accounts.

Code:
Error while backing up database database_name
mysqldump error output: mysqldump: Couldn't execute 'show fields from `bookings`': Can't create/write to file '/tmp/#sql_4a3a_0.MAI' (Errcode: 2 "No such file or directory") (1)

I thought it could have been a temporally problem so I then started a backup manually inside the DirectAdmin GUI but had the same errors.
Then I tried to restart MariaDB from the service monitor in DirectAdmin but this did not work so I tried it from the command line with :
Code:
service mysqld restart

And this gave me the error
Code:
service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.

Code:
systemctl status mariadb.service" and "journalctl -xe

Gave the errors I posted already in this thread.
I have no idea what was going wrong but I am very happy it was solved with killing the old process and then a simple start up of MariaDB.
I am having the flu and my head is pounding and I was afraid I had to spend the rest of the day figuring out what was wrong so needles to say you are a life saver. Thanks again for your quick reply's and help.
 
Back
Top