Symptoms
- Plesk Obsidian running on a Linux-based operating system
-
Plesk update process fails with the following error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
...
Trying to start service mysql... failed
...
server.example.com systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
server.example.com systemd[1]: Failed to start MariaDB 10.2.13 database server.
server.example.com systemd[1]: Unit mariadb.service entered failed state.
server.example.com systemd[1]: mariadb.service failed. -
MariaDB service fails to start. The following error message is logged in
/var/log/messages
(RHEL-based OS) or/var/log/syslog
(Debian-based OS):[ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
[Note] mysqld: Aria engine: starting recovery
recovered pages: 0% 10% 20% 30% 40% 50% 60% 70% 80%201210 16:07:56 [ERROR] mysqld got signal 11 ;
[ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'"
Cause
This error usually appears when MariaDB can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use and is confirmed to be an official bug for MariaDB, which can be viewed on the following link:
[MDEV-24788] Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11 - Jira
Note: This situation may be reached if the disk space on the server has run out or if the server stopped functioning suddenly while an update process tied to MariaDB was ongoing
Resolution
-
Connect to the Plesk server via SSH.
-
Shut down MariaDB database server:
Note: This is only necessary if MariaDB is still running
# mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` -h127.0.0.1 --protocol=tcp shutdown
-
Rename the
aria_log_control
file:# mv /var/lib/mysql/aria_log_control /var/lib/mysql/aria_log_control.orig
-
Restart the MariaDB service by executing this command:
# systemctl restart mariadb
-
Run Plesk Update by executing this command:
# plesk installer update