• 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 Error 500 Plesk\Exception\Database DB query failed: SQLSTATE[HY000] [2002] No such file or directory

Shasam

Basic Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
18.0.59
Hello,

My hard disk seems to have overloaded. I've fixed the problem.
But I have the following error on a Debian 10 and I could not find the solution to repair, despite what I read. Could you please help me?

500 Plesk\Exception\Database DB query failed: SQLSTATE[HY000] [2002] No such file or directory - File Mysql.php - Line 79

● mariadb.service - MariaDB 10.4.33 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Tue 2024-04-02 15:14:26 CEST; 212ms ago
Docs: man:mysqld(8)
systemd
Process: 16857 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 16858 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 16860 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/SUCCE
Process: 16943 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 16943 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Apr 02 15:14:23 vps-f88a6c66 systemd[1]: Starting MariaDB 10.4.33 database server...
Apr 02 15:14:23 vps-f88a6c66 mysqld[16943]: 2024-04-02 15:14:23 0 [Warning] Could not increase number of max_open_files to more than 32768 (request: 256414)
Apr 02 15:14:26 vps-f88a6c66 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 15:14:26 vps-f88a6c66 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Apr 02 15:14:26 vps-f88a6c66 systemd[1]: Failed to start MariaDB 10.4.33 database server.

What do you think I should do on the SSH command line?

Thank you in advance for your help.

Best regards.
 
Hello Bitpalast

I have seen this.
But I can't modify the :

/lib/systemd/system/mariadb.service
-bash: /lib/systemd/system/mariadb.service: Permission denied

Thanks for your help


Other information journalctl -xe

Apr 02 15:56:16 drwebd[2754]: To purchase: Dr.Web Enterprise Security Suite
Apr 02 15:56:16 drwebd.real[2754]: Dr.Web (R) daemon for Linux/Plesk Edition v6.0.2.9
Apr 02 15:56:16 drwebd.real[2754]: Copyright (c) Igor Daniloff, 1992-2024
Apr 02 15:56:16 drwebd.real[2754]: Doctor Web, Moscow, Russia
Apr 02 15:56:16 drwebd.real[2754]: Support service: Dr.Web technical support
Apr 02 15:56:16 drwebd.real[2754]: To purchase: Dr.Web Enterprise Security Suite
Apr 02 15:56:16 drwebd[2754]: Key file: /opt/drweb/drweb32.key - Key file was not found! (No such file or directory)
Apr 02 15:56:16 drwebd[2754]: A path to a valid license key file was not specified.
Apr 02 15:56:16 drwebd.real[2754]: Key file: /opt/drweb/drweb32.key - Key file was not found! (No such file or directory)
Apr 02 15:56:16 drwebd.real[2754]: A path to a valid license key file was not specified.
Apr 02 15:56:16 drwebd[2754]: Plesk authorization failed: malformed response (no 'response=' field).
Apr 02 15:56:16 drwebd[2754]: Error: Plesk Software not running.
Apr 02 15:56:16 drwebd.real[2754]: Plesk authorization failed: malformed response (no 'response=' field).
Apr 02 15:56:16 drwebd.real[2754]: Error: Plesk Software not running.
Apr 02 15:56:16 systemd[1]: drwebd.service: Main process exited, code=exited, status=255/EXCEPTION
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: Debian -- User Support
--
-- An ExecStart= process belonging to unit drwebd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 255.
Apr 02 15:56:16 systemd[1]: drwebd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: Debian -- User Support
--
-- The unit drwebd.service has entered the 'failed' state with result 'exit-code'.
 
You need to "sudo" (escalate to root privileges) first, then you can edit system relevant files.
 
It's ok but Here are the messages now displayed :

mariadb.service - MariaDB 10.4.33 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Tue 2024-04-02 16:29:58 CEST; 489ms ago
Docs: man:mysqld(8)
systemd
Process: 10872 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 10873 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 10875 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/SUCCE
Process: 10958 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 10958 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Apr 02 16:29:56 systemd[1]: Starting MariaDB 10.4.33 database server...
Apr 02 16:29:58 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 16:29:58 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Apr 02 16:29:58 systemd[1]: Failed to start MariaDB 10.4.33 database server.

And

Other information journalctl -xe


Apr 02 16:32:40 sw-engine-pleskrun[14209]: CommonPanel_Application_Abstract::initDbAdapter()
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 2: /opt/psa/admin/plib/Session/Helper.php:176
Apr 02 16:32:40 sw-engine-pleskrun[14209]: Plesk\Session\Helper::initStorage()
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 3: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:48
Apr 02 16:32:40 sw-engine-pleskrun[14209]: CommonPanel_Application_Abstract->run()
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 4: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:30
Apr 02 16:32:40 sw-engine-pleskrun[14209]: CommonPanel_Application_Abstract::init()
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 5: /opt/psa/admin/plib/pm/Bootstrap.php:18
Apr 02 16:32:40 sw-engine-pleskrun[14209]: pm_Bootstrap::init()
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 6: /opt/psa/admin/plib/sdk.php:11
Apr 02 16:32:40 sw-engine-pleskrun[14209]: require_once(string '/opt/psa/admin/plib/sdk.php')
Apr 02 16:32:40 sw-engine-pleskrun[14209]: 7: /opt/psa/admin/plib/WebSocket/bin/ws-server.php:3
Apr 02 16:32:40 sw-engine-pleskrun[14209]: ERROR: Plesk\Exception\Database: DB query failed: SQLSTATE[HY000] [2002] No such file or directory (Mysql.php:79)
Apr 02 16:32:40 systemd[1]: plesk-web-socket.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: Debian -- User Support
--
-- An ExecStart= process belonging to unit plesk-web-socket.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Apr 02 16:32:40 systemd[1]: plesk-web-socket.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: Debian -- User Support
--
-- The unit plesk-web-socket.service has entered the 'failed' state with result 'exit-code'.
Apr 02 16:32:41 sshd[14075]: Connection closed by authenticating user root 170.64.209.78 port 35126 [preauth]
 
Thank You Bitpalast,

Here's to the cause

:~# ls -la /etc/systemd/system/mariadb.service
ls: cannot access '/etc/systemd/system/mariadb.service': No such file or directory
:~# ls -la /usr/lib/systemd/system/mysqld.service
ls: cannot access '/usr/lib/systemd/system/mysqld.service': No such file or directory

ls -la /usr/lib/systemd/system/mariadb.service
-rw-r--r-- 1 root root 6135 Apr 2 16:28 /usr/lib/systemd/system/mariadb.service

I applied all the command lines
I repeated the operation twice, restarting the server.

systemctl status mariadb.service
● mariadb.service - MariaDB 10.4.33 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: activating (start) since Tue 2024-04-02 17:04:16 CEST; 2s ago
Docs: man:mysqld(8)
systemd
Process: 15426 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 15428 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 15430 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/SUCCE
Main PID: 15513 (mysqld)
Status: "Free innodb buffer pool"
Tasks: 2 (limit: 32439)
Memory: 225.9M
CGroup: /system.slice/mariadb.service
└─15513 /usr/sbin/mysqld

Apr 02 17:04:16 vps-f88a6c66 systemd[1]: Starting MariaDB 10.4.33 database server...

But I still have the problem of access to the Plesk interface
 
The 'No such file or directory' error usually means that the MySQL socket file is missing or can't be accessed. You might want to check where the socket file is supposed to be in your MariaDB config file (it's often in /etc/my.cnf or /etc/mysql/mariadb.conf.d/50-server.cnf). Just make sure the file is actually there and that it has the right permissions.
 
Back
Top