Forum archive
Automatic update rendered MariaDB unusable
This weeks automatic security update to LAMP killed MariaDB.
Symptoms:
root@Node2 ~# mysql -u root -p -e "show status like 'wsrep_cluster_size'"
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
root@Node2 ~# systemctl start mysql
Failed to start mysql.service: Unit mysql.service not found.
If I apt-get install mariadb-server:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
mariadb.service couldn't start.
root@Node1 ~# systemctl status mariadb.service
* mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-11-21 17:23:00 +03; 19min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 963 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 558 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, statu
Process: 545 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 529 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 963 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
* mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-11-21 17:23:00 +03; 19min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 963 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 558 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, statu
Process: 545 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 529 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 963 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Nov 21 17:08:16 Node1 systemd[1]: Starting MariaDB 10.1.37 database server...
Nov 21 17:08:21 Node1 sh[558]: WSREP: Recovered position 6c34f532-cf1b-11e8-8307-6a95dd60c96a:260151
Nov 21 17:08:21 Node1 mysqld[963]: 2018-11-21 17:08:21 140374751748544 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 963 ...
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 17:23:00 Node1 systemd[1]: Failed to start MariaDB 10.1.37 database server.
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Unit entered failed state.
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 21 17:08:21 Node1 sh[558]: WSREP: Recovered position 6c34f532-cf1b-11e8-8307-6a95dd60c96a:260151
Nov 21 17:08:21 Node1 mysqld[963]: 2018-11-21 17:08:21 140374751748544 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 963 ...
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 21 17:23:00 Node1 systemd[1]: Failed to start MariaDB 10.1.37 database server.
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Unit entered failed state.
Nov 21 17:23:00 Node1 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Any idea?
BR
Udo
I just posted in another thread you'd also posted in, but just to make sure you get the message, there was a recent security update which uninstalled MariaDB on TurnKey. As noted in the blog if you reinstall MariaDB, hopefully everything should go back to normal.
I was also going to recommend that you subscribe to our (low traffic) "security and news announcements" so you'll get email notifications of important blog posts, but I see that you already have!
Re your Galera Cluster issues, I would have expected that to "just work"?! If you are definitely on the latest version of MariaDB from the Debian repos, perhaps there has been a regression? AFAIK, they've bumped the version. It's only a minor version bump so I would expect the config to remain the same, but perhaps that's worth further investigation?
If you can detail how I can reproduce your issue, please let me know and assuming that I can reproduce it, we can lodge a bug with Debian and get the maintainers to investigate further.