Symptoms
-
Plesk is not accessible in a web browser with a "404 Not found nginx" error or a blank page.
-
Plesk command-line utilities are unavailable:
# plesk -v
plesk: command not foundor Plesk version cannot be retrieved:
# plesk -v
open /usr/local/psa/version: no such file or directory -
The
plesk-core
package is missing on the server:-
on CentOS/RHEL-based distributions:
# rpm -qa | grep plesk-core
- on Debian/Ubuntu-based distributions:
# apt list --installed | grep plesk-core
-
Cause
Plesk installation is corrupted because the Plesk packages have been removed. System package manager logs may indicate that Plesk packages have been removed recently:
-
on CentOS/RHEL-based distributions:
# grep Erased /var/log/yum.log | grep 'psa|plesk'
Nov 01 10:00:00 Erased: psa-firewall-17.8.11-cos7.build1708180301.19.x86_64
Nov 01 10:00:00 Erased: psa-updates-17.8.11-cos7.build1708180326.12.noarch
Nov 01 10:00:00 Erased: plesk-core-17.8.11-cos7.build1708180301.19.x86_64
<...> -
on Debian/Ubuntu-based distributions:
# grep remove /var/log/dpkg.log | grep 'psa|plesk'
2018-01-01 10:00:00 remove psa-mnemo:all 4.2.14-debian8.0.build1708180425.15 <none>
2018-01-01 10:00:00 remove psa-updates:all 17.8.11-debian8.0.build1708180326.12 <none>
2018-01-01 10:00:00 remove plesk-core:amd64 17.8.11-debian8.0.build1708180301.19 <none>
<...>
Resolution
-
Connect to the Plesk server via SSH.
-
Check if Plesk database exists using the command:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa
-
if it exists and you are connected to psa database:
MariaDB [psa]>
then move to step 3.
-
if you get the error message:
ERROR 1049 (42000): Unknown database 'psa'
restore the Plesk database from the latest daily dump:
# zcat /var/lib/psa/dumps/mysql.daily.dump.0.gz | sed -n '/-- Current Database: `psa`/,/-- Current Database:*/p' | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin
-
-
Download Plesk Installer:
# wget http://autoinstall.plesk.com/plesk-installer
-
Make the file executable:
# chmod +x plesk-installer
-
Start Plesk Installer and install the missing packages:
# ./plesk-installer
-
Proceed with the installation.
-
On Debian/Ubuntu-based distributions, re-link Plesk installation directory using these commands:
# unlink /usr/local/psa
# rm -rf /usr/local/psa
# ln -s /opt/psa /usr/local/psa