• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved After update to 18.0.38 #2: DB query failed: SQLSTATE[HY000] [2002] Connection refused

bgptbg

New Pleskian
After the update to 18.0.38 #2: i can't login to Plesk and database connection on our sites is not possible.



service mariadb restart
Restarting mariadb (via systemctl): Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[FAILED]


systemctl status mariadb.service
● mariadb.service - MariaDB 10.2.40 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Wed 2021-09-15 09:28:28 CEST; 325ms ago
Docs: man:mysqld(8)
systemd
Process: 13546 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS --basedir=/usr $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 13520 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 13517 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 13546 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Highest supported file format is Barracuda.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2721699446026
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 2721699446026 and the end 2721700750014.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Starting shutdown...
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Plugin 'InnoDB' init function returned error.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] Plugin 'FEEDBACK' is disabled.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Unknown/unsupported storage engine: InnoDB
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Aborting



journalctl -xe
Sep 15 09:28:27 xxx mysqld[13546]: 2021-09-15 9:28:27 140023518275776 [Note] /usr/sbin/mysqld (mysqld 10.2.40-MariaDB) starting as process 13546 ...
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Uses event mutexes
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Compressed tables use zlib 1.2.7
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Using Linux native AIO
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Number of pools: 1
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Using SSE2 crc32 instructions
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Completed initialization of buffer pool
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140022925072128 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Highest supported file format is Barracuda.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2721699446026
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] InnoDB: Missing MLOG_CHECKPOINT between the checkpoint 2721699446026 and the end 2721700750014.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] InnoDB: Starting shutdown...
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Plugin 'InnoDB' init function returned error.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [Note] Plugin 'FEEDBACK' is disabled.
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Unknown/unsupported storage engine: InnoDB
Sep 15 09:28:28 xxx mysqld[13546]: 2021-09-15 9:28:28 140023518275776 [ERROR] Aborting
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: [2021-09-15 09:28:28.783] 13561:6141a09cbf09d ERR [panel] DB query failed: SQLSTATE[HY000] [2002] Connection refused:
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 0: /usr/local/psa/admin/plib/Db/Adapter/Pdo/Mysql.php:79
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: Db_Adapter_Pdo_Mysql->query(string 'SET sql_mode = ''')
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 1: /usr/local/psa/admin/plib/CommonPanel/Application/Abstract.php:103
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: CommonPanel_Application_Abstract::initDbAdapter()
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 2: /usr/local/psa/admin/plib/Session/Helper.php:176
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: Plesk\Session\Helper::initStorage()
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 3: /usr/local/psa/admin/plib/CommonPanel/Application/Abstract.php:52
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: CommonPanel_Application_Abstract->run()
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 4: /usr/local/psa/admin/plib/CommonPanel/Application/Abstract.php:34
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: CommonPanel_Application_Abstract::init()
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 5: /usr/local/psa/admin/plib/pm/Bootstrap.php:16
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: pm_Bootstrap::init()
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 6: /usr/local/psa/admin/plib/sdk.php:11
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: require_once(string '/usr/local/psa/admin/plib/sdk.php')
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: 7: /usr/local/psa/admin/plib/WebSocket/bin/ws-server.php:3
Sep 15 09:28:28 xxx sw-engine-pleskrun[13561]: ERROR: Plesk\Exception\Database: DB query failed: SQLSTATE[HY000] [2002] Connection refused (Mysql.php:79)
 

Attachments

  • 001.jpg
    001.jpg
    90.2 KB · Views: 7
mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` -h127.0.0.1 --protocol=tcp shutdown
mysqladmin: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (115)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists
 
Check if "innodb_force_recovery" is mentioned in the my.cnf file. If so, what is the value?
 
Hi Peter,

innodb_force_recovery is not in this file. We decided to mount the files in /var/lib/mysql from the last backup, cause many tables and databases was corrupt, the redo log too.

I disabled the automatic backup from plesk. In the future i will make a snapshot and then update plesk and packages.
 
I got the same problem, even after the procedure by WebHostingAce, mariadb.service is not working

Code:
[root@plesk ~]# systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.31 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since dom 2021-09-19 08:48:42 CEST; 15s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 22959 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
  Process: 22795 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 22793 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
 Main PID: 22959 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

set 19 08:48:40 mysqld[22959]: 2021-09-19  8:48:40 0 [Note] InnoDB: 10.3.31 started; log sequence number 762826046573; transacti...99024739
set 19 08:48:40 mysqld[22959]: 2021-09-19  8:48:40 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
set 19 08:48:40 mysqld[22959]: 2021-09-19  8:48:40 0 [Note] Plugin 'FEEDBACK' is disabled.
set 19 08:48:40 mysqld[22959]: 2021-09-19  8:48:40 0 [ERROR] Aria engine is not enabled or did not start. The Aria engine must b...p-tables
set 19 08:48:40 mysqld[22959]: 2021-09-19  8:48:40 0 [ERROR] Aborting
set 19 08:48:42 mysqld[22959]: Warning: Memory not freed: 520
set 19 08:48:42 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
set 19 08:48:42 systemd[1]: Failed to start MariaDB 10.3.31 database server.
set 19 08:48:42 systemd[1]: Unit mariadb.service entered failed state.
set 19 08:48:42 systemd[1]: mariadb.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@plesk ~]# service mariadb restart
Restarting mariadb (via systemctl):  Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
                                                           [FALLITO]
 
Enable error log on mariadb: Error Log

Code:
[mysqld_safe]
log_error=/var/log/mariadb.log
[mysqld]
log_error=/var/log/mariadb.log

Check the error log after trying to start mariadb

You could try this fix but it really depends on what the issue is with the Aria logs Aria FAQ
Backup mysql folder:
Code:
cp -ap /var/lib/mysql /var/lib/mysql_orig

mv /var/lib/mysql/aria_log_control /var/lib/mysql/aria_log_control.bkup

systemctl start mariadb
systemctl status mariadb

If it doesnt work;
Code:
mv /var/lib/mysql /var/lib/mysql_temp
cp -ap /var/lib/mysql_orig /var/lib/mysql

And your back to where you started.

I would recommend getting this examined by Plesk support or someone db familiar.
 
I think to have solved it updating MariaDB.
Now it's working, but I'm keeping fingers crossed.
 
Back
Top