One of our customer's cpanel boxes is running v.104.0.3 on Centos 7.9, system PHP is 7.4. They elected to upgrade MySQL to MariaDB 10.3 a couple of months ago. No issues until today when we started getting email alerts about MySQL being down.
Logged into WHM, restarted mysql:
Checked processes at cl:
Just for grins, decided to restart using cli and see what happens:
And
So, daemon is running, but cpanel doesn't think so. What do we do to fix this besides turning off mysql monitoring to stop the emails (which we did)?
Logged into WHM, restarted mysql:
Code:
Cpanel::Exception::Services::StartError Service Status
undefined status from Cpanel::ServiceManager::Services::Mysql
Service Error
(XID sw5u44) The “mysql” service failed to start.
Startup Log
Jun 06 14:35:23 cp5.domain.tld systemd[1]: Starting MariaDB 10.3.35 database server...
Jun 06 14:35:24 cp5.domain.tld mysqld[18437]: 2022-06-06 14:35:24 0 [Note] /usr/sbin/mysqld (mysqld 10.3.35-MariaDB) starting as process 18437 ...
Jun 06 14:35:57 cp5.domain.tld systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Jun 06 14:35:57 cp5.domain.tld systemd[1]: Failed to start MariaDB 10.3.35 database server.
Jun 06 14:35:57 cp5.domain.tld systemd[1]: Unit mariadb.service entered failed state.
Jun 06 14:35:57 cp5.domain.tld systemd[1]: mariadb.service failed.
mysql has failed. Contact your system administrator if the service does not automagically recover.
Code:
[ [email protected] ~># ps axuww |grep mysql
mysql 509 0.0 0.0 113416 1304 ? Ss 13:31 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 690 0.1 3.1 1773552 121516 ? Sl 13:31 0:04 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/cp5.domain.tld.err --open-files-limit=40000 --pid-file=cp5.domain.tld.pid
root 18711 0.0 0.0 112812 980 pts/0 S+ 14:36 0:00 grep --color=auto mysql
Code:
[ [email protected] ~># /usr/bin/systemctl restart mariadb.service --no-ask-password
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[ [email protected] ~># ps axuww |grep mysql
mysql 509 0.0 0.0 113416 1268 ? Ss 13:31 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 690 0.1 2.5 1773552 98028 ? Sl 13:31 0:04 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/cp5.domain.tld.err --open-files-limit=40000 --pid-file=cp5.domain.tld.pid
root 21502 0.0 0.0 112812 980 pts/0 S+ 14:50 0:00 grep --color=auto mysql
[ Mon Jun 06 14:50:55 ]
Code:
[ [email protected] scripts># ./restartsrv_mysql
Waiting for “mysql” to start ……info [restartsrv_mysql] systemd failed to start the service “mariadb” (The “/usr/bin/systemctl restart mariadb.service --no-ask-password” command (process 23151) reported error number 1 when it ended.): Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
…info [restartsrv_mysql] systemd failed to start the service “mariadb” (The “/usr/bin/systemctl restart mariadb.service --no-ask-password” command (process 23391) reported error number 1 when it ended.): Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
…info [restartsrv_mysql] systemd failed to start the service “mariadb” (The “/usr/bin/systemctl restart mariadb.service --no-ask-password” command (process 23729) reported error number 1 when it ended.): Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
…failed.
Cpanel::Exception::Services::StartError
Service Status
undefined status from Cpanel::ServiceManager::Services::Mysql
Service Error
(XID 9u3n8c) The “mysql” service failed to start.
Startup Log
Jun 06 15:00:41 cp5.domain.tld systemd[1]: Starting MariaDB 10.3.35 database server...
Jun 06 15:00:41 cp5.domain.tld mysqld[23764]: 2022-06-06 15:00:41 0 [Note] /usr/sbin/mysqld (mysqld 10.3.35-MariaDB) starting as process 23764 ...
Jun 06 15:01:14 cp5.domain.tld systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Jun 06 15:01:14 cp5.domain.tld systemd[1]: Failed to start MariaDB 10.3.35 database server.
Jun 06 15:01:14 cp5.domain.tld systemd[1]: Unit mariadb.service entered failed state.
Jun 06 15:01:14 cp5.domain.tld systemd[1]: mariadb.service failed.
mysql has failed. Contact your system administrator if the service does not automagically recover.
[ Mon Jun 06 15:01:14 ]
[ [email protected] scripts># ps axuww |grep mysql
mysql 509 0.0 0.0 113416 1268 ? Ss 13:31 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 690 0.0 2.5 1773552 98016 ? Sl 13:31 0:05 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/cp5.domain.tld.err --open-files-limit=40000 --pid-file=cp5.domain.tld.pid
root 24161 0.0 0.0 112812 976 pts/0 S+ 15:02 0:00 grep --color=auto mysql