• 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

Issue No Plesk login page after snapshot restore - MySQL server missing?

akira9000

Basic Pleskian
Morning guys,

CentOS 7.4 - Plesk Onyx 17.5.3

After trying to fix an issue last night I ended up restoring a snapshot on the server which has led to a new issue.
I've SSH'd and done df -h. Disk is showing 106GB used. This is correct so I know the disk contents is still there but...Plesk login page now just gives:

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Connection refused

Additionally, an exception has occurred while trying to report this error: Zend_Exception
No entry is registered for key 'translate' (Abstract.php:144)

Search for related Knowledge Base articles

ERROR: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] Connection refused' in /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:129 Stack trace: #0 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(129): PDO->__construct('mysql:dbname=ps...', 'admin', '$AES-128-CBC$/Z...', Array) #1 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect() #2 /usr/local/psa/admin/externals/Zend/Db/Adapter/Abstract.php(460): Zend_Db_Adapter_Pdo_Mysql->_connect() #3 /usr/local/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('select param, v...', Array) #4 /usr/local/psa/admin/plib/Db/Adapter/Pdo/Mysql.php(30): Zend_Db_Adapter_Pdo_Abstract->query('select param, v...', Array) #5 /usr/local/psa/admin/plib/db.php(36): Db_Adapter_Pdo_Mysql->query('select param, v...') #6 /usr/local/psa/admin/plib/db.php(212): db_query('select param, v...', false) #7 /usr/local/psa/admin/plib/Plesk/Mode.php(439): ge (Abstract.php:144)

Search for related Knowledge Base articles

So I've tracked this down to MySQL issue.
Tried:

Code:
# service mysqld start

Just get:

Code:
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit not found.

How could the DB server be missing from the snapshot? And probably more importantly, can I reinstall it? If so what is the correct syntax.

Cheers
 
Try to use

# systemctl status mariadb
# systemctl start mariadb

commands.
 
Hi akira9000,
just a my opinion, in the future take a snapshot when your system is completely down. I've worked a lot on VM (vmware) and the BEST practice, it's to take a snapshot when your system it's turn off, even if "everybody" can tell you that it isn't necessary...
Naturally, you can take snapshot when your system it's working but if your system it's working there's could be the possibility that you missing (or corrupt) some data. I hope that it isn't your case.
 
On the first command I get

Code:
# systemctl status mariadb -l
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-11-14 05:32:02 GMT; 3h 0min ago
  Process: 23709 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
  Process: 23708 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 23677 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 23708 (code=exited, status=0/SUCCESS)

Nov 14 05:32:01 467189.vps-10.com systemd[1]: Starting MariaDB database server...
Nov 14 05:32:01 467189.vps-10.com mariadb-prepare-db-dir[23677]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Nov 14 05:32:01 467189.vps-10.com mariadb-prepare-db-dir[23677]: If this is not the case, make sure the /var/lib/mysql is empty before running mariadb-prepare-db-dir.
Nov 14 05:32:02 467189.vps-10.com mysqld_safe[23708]: 171114 05:32:02 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Nov 14 05:32:02 467189.vps-10.com mysqld_safe[23708]: 171114 05:32:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Nov 14 05:32:02 467189.vps-10.com systemd[1]: mariadb.service: control process exited, code=exited status=1
Nov 14 05:32:02 467189.vps-10.com systemd[1]: Failed to start MariaDB database server.
Nov 14 05:32:02 467189.vps-10.com systemd[1]: Unit mariadb.service entered failed state.
Nov 14 05:32:02 467189.vps-10.com systemd[1]: mariadb.service failed.

On the second command I get

Code:
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
 
there are two istance of mysql active.
Try netstat -apn | grep 3306 and eventually kill the double process
 
so, it seems that there isn't any istance of mysql/mariadb active.
Try systemctl start mariadb as Igor say you
 
As stated before Overwolf I just get

Code:
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
 
Guys,

Thanks for your help to this point. I've just heard from my host that the VPS has been quite seriously corrupted - the Plesk part of it anyway. In the snapshot I have lots of nightly backups that I am going to have to sift through to hopefully find a working site.

Could I change the thread to ask how do I download Plesk internal backups over SSH? Or is there an FTP method? I know FTP as root is a bad idea in general but in this occasion as soon as I have my backups the VPS will be wiped, start fresh and site data & DB reimported.

Happy to start another thread if preferred.
 
Have ended up starting from a fresh build & digging for backups in the snapshot with SFTP. Thanks for your help guys.
 
Back
Top