Symptoms
-
After an update on a Plesk server with CentOS 7.9 and MariaDB 10.5, MariaDB is crashing and does not start.
-
Output of
systemctl status mariadb
shows the following:CONFIG_TEXT: May 15 09:34:50 server.example.com systemd[1]: Starting MariaDB 10.5.25 database server...
May 15 09:34:51 server.example.com systemd[1]: mariadb.service: main process exited, code=exited, status=218/CAPABILITIES
May 15 09:34:51 server.example.com systemd[1]: Failed to start MariaDB 10.5.25 database server.
May 15 09:34:51 server.example.com systemd[1]: Unit mariadb.service entered failed state.
May 15 09:34:51 server.example.com systemd[1]: mariadb.service failed. -
Yum log
/var/log/yum.log
shows a recent update:CONFIG_TEXT: May 15 03:30:58 Updated: MariaDB-common-10.5.25-1.el7.centos.x86_64
May 15 03:30:58 Updated: MariaDB-compat-10.5.25-1.el7.centos.x86_64
May 15 03:31:02 Updated: MariaDB-client-10.5.25-1.el7.centos.x86_64
May 15 03:31:04 Updated: galera-4-26.4.18-1.el7.centos.x86_64
May 15 03:31:22 Updated: MariaDB-server-10.5.25-1.el7.centos.x86_64
May 15 03:31:22 Updated: MariaDB-shared-10.5.25-1.el7.centos.x86_64
Cause
Outdated kernel incompatibility with systemd unit functionality used by MariaDB starting from recent 10.5 update and above.
# [root@plesk my.cnf.d]# uname -a
Linux hostname 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Resolution
-
Connect to the server via SSH
-
Update the kernel via the package manager.
# yum update -y
Alternatively, if the kernel cannot be updated at the present moment, a workaround can be used:
Workaround #1
Comment out the affecting line:
-
Connect to the server via SSH
-
Create the folder /etc/systemd/system/mariadb.service.d/
# mkdir -p /etc/systemd/system/mariadb.service.d/ && cd /etc/systemd/system/mariadb.service.d/
-
Within that folder, create the file
override.conf
with your preferred text editor. -
Add the following lines to the file:
MYSQL_LIN: [Service]
CapabilityBoundingSet=
AmbientCapabilities= -
Save the file.
-
Reload the daemon:
# systemctl daemon-reload
-
Restart MariaDB:
# systemctl restart mariadb
Workaround #2
Downgrade the MariaDB packages:
-
Check the last update list:
# yum history
-
Confirm the latest update with Action corresponding to I,U or Update that altered MariaDB packages:
# yum history info <ID>
-
Undo that transaction ID:
# yum history undo <ID>
-
Restart MariaDB
# systemctl restart mariadb
Comments
0 comments
Please sign in to leave a comment.