Article ID: 114289, created on Jul 5, 2012, last review on May 11, 2014

  • Applies to:
  • Plesk for Linux/Unix

Symptoms

After an upgrade attempt, Parallels Plesk Panel (PP) becomes unreachable; psa packages are not upgraded; /usr/local/psa/version remains the same version as before the upgrade attempt; and the version value in the misc table of the psa database shows the old version of PP.

While checking autoinstaller3.log, you can see the following entries:

   ===> Installing psa database
     Trying to start MySQL server... Checking for service MySQL: ..running
     Trying to define valid mysql credentials...  Trying to establish test connection... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
     Trying to establish test connection... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 

Cause

The cause of the issue could be that the MySQL init script (/etc/init.d/mysql) exits too early from the "start" routine while the server is still in the process of starting; therefore, the upgrade process exits with an error.

Resolution

To work around this issue, you can add a delay at the end of the "stop" and "start" functions of the mysql script in /etc/init.d/mysql (marked with green):

Start routine:
        echo -n "Starting service MySQL "

        $SAFE_MYSQLD \
            --user=$mysql_daemon_user \
            --pid-file=$pid_file \
            --socket=$socket \
            --datadir=$datadir &>/dev/null &

        sleep 10

        for((i=0; i<50; i++)); do
           sleep 0.2
           test -S $socket && i='' && break
        done


Stop routine:
stop) echo -n "Shutting down service MySQL " killproc -p $pid_file -TERM $MYSQLD sleep 10 # Remember status and be verbose rc_status -v ;;
After that, you can re-initiate the upgrade process.

29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c a914db3fdc7a53ddcfd1b2db8f5a1b9c

Email subscription for changes to this article
Save as PDF