Articles in this section

MariaDB fails to start: Aria engine is not enabled or did not start

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk update fails with the following error message:

    CONFIG_TEXT: 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. One of the following error messages is logged in /var/log/messages(RHEL-based OS) or /var/log/syslog (Debian-based OS):

    CONFIG_TEXT: [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

    CONFIG_TEXT: [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 ;

    CONFIG_TEXT: [ERROR] Could not open mysql.plugin table: "Unknown storage engine 'Aria'"

    CONFIG_TEXT: [ERROR] mariadbd: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds

    CONFIG_TEXT: [ERROR] mariadbd: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'

Cause

This error usually appears when MariaDB can't lock aria control file /var/lib/mysql/aria_log_control for exclusive use. This behavior is confirmed to be a bug in MariaDB:

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

  1. Connect to your Plesk server via SSH.
  2. Shut down MariaDB database server:

    # mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` -h127.0.0.1 --protocol=tcp shutdown

  3. Rename the aria_log_control file:

    # mv /var/lib/mysql/aria_log_control /var/lib/mysql/aria_log_control.orig

  4. Restart MariaDB service:

    # systemctl restart mariadb

  5. Run Plesk Update:

    # plesk installer update

If you continue to encounter MariaDB errors that are similar to the following afterwards:
 

CONFIG_TEXT: Mar 08 15:06:43 server mariadbd[1407122]: 2024-03-08 15:06:43 0 [Note] Starting MariaDB 10.6.16-MariaDB-0ubuntu0.22.04.1 source revision as process 1407122
Mar 08 15:06:43 server mariadbd[1407122]: 2024-03-08 15:06:43 0 [Note] mariadbd: Aria engine: starting recovery
Mar 08 15:06:43 server mariadbd[1407122]: recovered pages: 0% 10%
Mar 08 15:06:43 server mariadbd[1407122]: 2024-03-08 15:06:43 0 [ERROR] mariadbd: Got error '127 "Table file is corrupted"' for './mysql/proc.MAI'
Mar 08 15:06:43 server mariadbd[1407122]: 2024-03-08 15:06:43 0 [ERROR] mariadbd: Got error '127 "Table file is corrupted"' for './mysql/proc.MAI'
Mar 08 15:06:43 server mariadbd[1407122]: Got error 127 when executing record redo_new_row_tail
Mar 08 15:06:43 server mariadbd[1407122]: 2024-03-08 15:06:43 0 [ERROR] mariadbd: Aria engine: Redo phase failed
/

You can recover the listed tables and start MariaDB by doing the following:
1. Log into the server via SSH
2. Execute the following command:

# aria_chk --recover /var/lib/mysql/mysql/*.MAI

3. Restart MariaDB by executing the following command:
 

# systemctl restart mariadb

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.