Well what a week. Thank you readers for dropping by at my tech blog once in a while. I know i don't frequently update it due to lack of time but here I am, ready to post new ideas again.

Yesterday, we ran into a "not so difficult" problem, at all. Here's the story.

We need to install the Sitebuilder package since one of the clients need the application. We installed the Sitebuilder support using the Plesk updater. Installation successful as per Plesk but upon checking, still no sitebuilder support. Next step, we did an upgrade from Plesk 8.4 to Plesk 8.6. We got a prompt again saying that the upgrade was successful. Ok got it. But, after a few minutes, Plesk started acting really weird. We checked the status of the PSA service and here comes the real fiasco. We got an error of course:

psa dead but subsys locked


Oh not again. I happen to encounter this kind of problem on the http, vsftp etc daemons. But I can easily fix them by just restarting the machine or deleting the corresponding /var/lock/subsys file and then start the service again. I did this for a couple of times for the PSA service but to no avail, Plesk isn't just working! I looked at the logs and I just can't find any clues there.

Well, what we did is to email the Parallels Support team. We didn't got any answer overnight so we are feeling a bit hopeless about the case. The next morning, ideas are fresh and we started looking at the key answer to the problem.

/tmp/autoinstaller3.log

So yup. I looked into the updater logs and found this:

Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: N
O)
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: Y
ES)
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: N
O)
Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... Could not open required defaults file: /root/.my.cnf
Fatal error in defaults handling. Program aborted

ERROR while trying to establish test connection

Check the error reason(see log file:
/tmp/psa_8.6.0_cos4.build86080722.02_upgrade.090207.07.37.log), fix and try
again

Aborting...

error: %post(psa-8.6.0-cos4.build86080722.02.i586) scriptlet failed, exit
status 1

Attention! Your software might be inoperable.
Please, contact product technical support.



Unable to connect to Mysql? Duh?. FYI, the script looks into the .psa.shadow for the mysql password. But here's the dish. We can login into the mysql server using the password defined in the .shadow file. So how come we cannot run the upgrade without the creepy errors?

Per Parallels support, we we're running a "mixed" version of Plesk. Probably because of the failed upgrade.

Just in case you noticed this error, I stumbled into a knowledgebase entry regarding the /root/.my.cnf file.

SYMPTOMS:

Plesk upgrade or installation fails with the error in upgrade log:

Access denied for user 'admin'@'localhost' (using password: YES)\n")


RESOLUTION:

Make sure that there is no /root/.my.cnf file with MySQL password. Plesk uses environment variable to pass the password to MySQL server, but the .my.cnf file has greater priority and MySQL uses the password from the file. If it does not match, restoration fails.

Also, check that you are able to connect to MySQL from the command line with:


# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa


You should not have any .my.cnf file on the /root directory. Although I tried creating a symlink to /etc/my.cnf. But it didn't made any difference. The error for the missing .my.cnf was gone but we we're still not able to finish the upgrade.

SOLUTION

We replaced the admin password to a more simplier password.

Login into the mysql server. and then run this command:

UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='admin';

and then

flush privileges;


Do not FORGET to update the /etc/psa/.psa.shadow file for the new password.

Then re-run the upgrade.

# cd /root/86/dist-rpm-CentOS-4.2-i386
# rpm -Uvh --force base/*.rpm opt/migration/*.rpm opt/backup/*.rpm


Finally, Plesk is now behaving perfectly fine! There you go. A complex problem with a really simple solution.

Hope this sheds a light to anyone out there having the same problem.

Current Mood: Fulfilled but exhausted.

Recommended buys!

2 comments

  1. ┼čifrem unuttum  

    November 26, 2010 at 12:32 AM

    thank you for knowledge

  2. adminix  

    December 6, 2011 at 10:59 AM

    A late response, but you are most welcomed. I am glad that I can help people in my own little ways. :)