Plesk is not accessible: Unknown column 'parentDomainId' in 'where clause'

Created:

2016-11-16 13:13:07 UTC

Modified:

2017-08-16 17:22:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk is not accessible: Unknown column 'parentDomainId' in 'where clause'

Applicable to:

  • Plesk 11.x for Linux

Symptoms

Plesk is no accessible after the upgrade, the following error appears:

ERROR: PleskMainDBException: MySQL query failed: Unknown column 'parentDomainId' in 'where clause'

The following errors can be also observed in the /usr/local/psa/admin/logs/panel.log :

[panel]: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'IP_Addresses.serviceNodeId' in 'on clause'

[panel]: Error: MySQL query failed: Unknown column 'parentDomainId' in 'where clause'

[panel]: Error: MySQL query failed: Unknown column 'd.parentDomainId' in 'where clause'

[panel]: MySQL query failed: Unknown column 'ip_dual_stack' in 'field list'

Cause

Database was not upgraded.

Resolution

  1. Create database backups:

    # mkdir /root/mysql_backups/
    # mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Ne"show databases"|grep -v information_schema|while read db;do mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` $db > /root/mysql_backups/$db.`date +%F_%H.%M`.sql;done
  2. Obtain psa database dump from pre-upgrade backup:

    # grep -i dump /etc/psa/psa.conf
    DUMP_D /var/lib/psa/dumps
    DUMP_TMP_D /tmp

    # ls -lt /var/lib/psa/dumps | grep preupgrade | head -n2
    -rw------- 1 root root 3127 Jun 3 13:08 mysql.preupgrade.apsc.11.5.30-11.5.30.20140603-130829.dump.gz
    -rw------- 1 root root 3127 Jun 3 13:08 mysql.preupgrade.apsc.11.5.30-11.5.30.20140603-130822.dump.gz
    # gzip -dc /var/lib/psa/dumps/mysql.preupgrade.11.5.30-11.5.30.20140524-034144.dump.gz > psa.sql
  3. Restore database and run bootstrapper.sh :

    # cat psa.sql |  mysql -uadmin -p`cat /etc/psa/.psa.shadow `
    # /usr/local/psa/bootstrapper/pp11.5.30-bootstrapper/bootstrapper.sh prep-install
    # /usr/local/psa/bootstrapper/pp11.5.30-bootstrapper/bootstrapper.sh rerun
Have more questions? Submit a request
Please sign in to leave a comment.