Plesk Panel is not accessible after the upgrade: Can't create/write to file '/tmp/#sql_691_0.MYI

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 10.3 for Linux
  • Plesk 10.x and below for Linux

Created:

2016-11-16 12:57:50 UTC

Modified:

2016-12-21 19:38:44 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Plesk Panel is not accessible after the upgrade: Can't create/write to file '/tmp/#sql_691_0.MYI

Symptoms

  1. Plesk Panel is not accessible after the upgrade. The following error can be observed in the /usr/local/psa/admin/logs/panel.log :

    2013-09-14T00:30:40+01:00 CRIT (2): Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_691_0.MYI' (Errcode: 28)
    file: /usr/local/psa/admin/plib/Zend/Db/Statement/Pdo.php
    line: 238
    code: 0
  2. The Plesk version file /usr/local/psa/version has incorrect Plesk version:

    # cat /usr/local/psa/version
    10.3.1 CentOS 6 1013110726.09
  3. There are two psa packages in the system: psa package from the previous Plesk Panel version and from the 11.5 Plesk Panel.

    # rpm -q psa
    psa-10.3.1-rhel6.build1012110718.16.x86_64
    psa-11.5.30-cos6.build115130819.13.x86_64

Cause

Failed upgrade from previous version.

Resolution

  1. Create databases backup:

    # mkdir /root/mysql_backups/
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Ne"show databases"|grep -v information_schema|while read db;do MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin $db > /root/mysql_backups/$db.`date +%F_%H.%M`.sql;done
  2. Find the pre-upgrade psa dump:

    # grep -i dump_d /etc/psa/psa.conf
    DUMP_D /var/lib/psa/dumps

    # ls -l /var/lib/psa/dumps/mysql.preupgrade*
    -rw------- 1 root root 461031 Sep 14 19:15 /var/lib/psa/dumps/mysql.preupgrade.10.12.0-11.5.30.20130914-191454.dump.gz
    -rw------- 1 root root 2524 Sep 14 19:15 /var/lib/psa/dumps/mysql.preupgrade.apsc.10.12.0-11.5.30.20130914-191504.dump.gz
  3. Use found mysql.preupgrade dump, run the following command:

    # zcat /var/lib/psa/dumps/mysql.preupgrade.10.12.0-11.5.30.20130914-191454.dump.gz | sed -n '/^CREATE DATABASE.*psa/,/^CREATE DATABASE.*horde/p' > preupgrade.sql
  4. Remove psa-11.5.30 package:

    # rpm -q psa
    psa-10.3.1-rhel6.build1012110718.16.x86_64
    psa-11.5.30-cos6.build115130819.13.x86_64
    # rpm -e --nodeps --noscripts --justdb psa-11.5.30-cos6.build115130819.13.x86_64
  5. Restore the pre-upgrade psa database :

    # cat preupgrade.sql | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin
  6. Run Plesk Panel upgrade using the autoinstaller :

    # /usr/local/psa/admin/bin/autoinstaller
Have more questions? Submit a request
Please sign in to leave a comment.