skip to Main Content

So I have just encountered a problem with my Plesk server and have been trying to figure it out. This is on a Plesk Obsidian 18.0.36 server with Ubuntu 20.04 running on MariaDB 10.3.29.

The error:

DB query failed: SQLSTATE[HY000] [2002] No such file or directory

And I did what most people would:

plesk repair all -y
DB query failed: SQLSTATE[HY000] [2002] No such file or directory

Same error again, so I went on to restart the server and hope that fixed what ever the problem is with the DB.

Didn’t work but at least Plesk will show an error page the domains instead of browser saying connection problem.

Went to check DB status:

systemctl status mysql
● mariadb.service - MariaDB 10.3.29 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sun 2021-07-25 01:37:23 PDT; 11min ago
       Docs: man:mysqld(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 1220 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
    Process: 1288 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
    Process: 1291 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 >
   Main PID: 1397 (mysqld)
     Status: "Waiting for page cleaner"
      Tasks: 3 (limit: 18993)
     Memory: 79.8M
     CGroup: /system.slice/mariadb.service
             └─1397 /usr/sbin/mysqld

It says Waiting for page cleaner very interesting, no idea what that is but I believe it is a buffer cleaner triggered by the restart.

I then tried restarting and stopping the service:

$ systemctl restart mysql
^C
$ systemctl stop mysql
^C

The command line just became unresponsive and I have to stop it after a while… So time to went into some deep thinking and googling mode.

I did find out the solution eventually by accident, it is right below this post.

3

Answers


  1. Chosen as BEST ANSWER

    Now the logical thing is to check what the heck is going on with the DB, the sockets are not there for obvious reasons, and the DB is not showing up on Plesk either.

    I'm not sure what get into me but I went on attempting to reinstall the DB, so I do

    sudo apt-get update
    

    And I get a whole bunch of new errors:

    Error writing to output file - write (28: No space left on device)
    

    Which then I have a lightbulb moment and did:

    df -h
    

    And to my surprise the /var volume is full, I thought it would take a while for it to fill up but apparently, I was wrong.

    Filesystem             Size  Used Avail Use% Mounted on
    /dev/mapper/plesk-var    50G   48G     0 100% /var
    

    So I increase the volume

    lvresize --resizefs --size 200GB /dev/plesk/var
    

    And did the update

    sudo apt-get update
    

    No errors, looking good. Attempting to restart DB service:

    service mariadb restart
    

    All good, the page is loading, everything looks good and it looks like the whole thing has been fixed and all done.

    I did run into problems again but running plesk repair all -y fixed them.

    Just want to share this with anyone having the problem and maybe this will help, and also a doc for future reference if I encounter this again.


  2. Another solution is:

    sudo cat /var/log/mysql/error.log
    

    The last lines of the log will indicate the problem.

    Login or Signup to reply.
  3. you can try

    sudo mkdir newtmp
    sudo cp -r /tmp /newtmp
    sudo rm -rf /tmp
    mkdir /tmp
    

    You do the backup in case it asks you for a file and it does not automatically rebuild it, otherwise you will not use it, the backup is newtmp, this works if the tmp is only a folder if it is a partition it is another procedure

    restart the system plesk

    reboot
    

    is all

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search