Errors during auto update

koda

Well-Known Member
Jan 10, 2014
63
2
58
cPanel Access Level
Root Administrator
We receive errors from Cron during the auto update in WHM.
IN particular the error seems to be somehow related to the auto-update of mysql:

[20140306.214636] Hooks system enabled
[20140306.214636] Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
[20140306.214636] All required 'pre' hooks have been run
[20140306.214636] No RPMS need to be uninstalled
[20140306.214636] Installing new rpms: MySQL55-server-5.5.36-1.cp1136.x86_64.rpm
[20140306.214637] Preparing packages for installation...
[20140306.214637] You have more than one PID file:
[20140306.214637] -rw-rw----. 1 mysql mysql 6 Jan 23 21:12 /var/lib/mysql/my-virtualserver-istance.local.pid
[20140306.214637] -rw-rw----. 1 mysql mysql 5 Jan 27 17:57 /var/lib/mysql/mailserver.xxxxxx.xxx.pid
[20140306.214637] Please check which one (if any) corresponds to a running server
[20140306.214637] and delete all others before repeating the MySQL upgrade.
[20140306.214637] error: %pre(MySQL55-server-5.5.36-1.cp1136.x86_64) scriptlet failed, exit status 1
[20140306.214637] error: install: %pre scriptlet failed (2), skipping MySQL55-server-5.5.36-1.cp1136
[20140306.214637] W Error Code: 1
[20140306.214637] E The following possible errors were detected while installing RPMs:
[20140306.214637] E %pre(MySQL55-server-5.5.36-1.cp1136.x86_64) scriptlet failed, exit status 1 install
[20140306.214637] The Administrator will be notified to review this output when this script completes
[20140306.214637] Checking for and running RPM::Versions 'post' hooks for any RPMs just installed
[20140306.214637] All required 'post' hooks have been run
[20140306.214637] Re-enabling service monitoring.
[20140306.214637] All files have been updated.
[20140306.214637] E Detected events which require user notification during updatenow. Will send iContact the log

any hint?
Thanks in advance!
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
Do this:

1) stop mysql
2) delete the PID files in /var/lib/mysql:

Code:
rm -v /var/lib/mysql/*.pid
3) start mysql
4) run the update again

The error in the update is pretty clear that the problem is related to the pids. Alternatively, just delete whatever pid doesn't correspond to the hostname of your server.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

This could have happened if the hostname was changed with MySQL running. You could stop MySQL and remove the PID file before upgrading MySQL again as Vanessa suggested. EX:

Code:
service mysql stop && rm -vi /var/lib/mysql/*.pid
service mysql start
Thank you.
 

koda

Well-Known Member
Jan 10, 2014
63
2
58
cPanel Access Level
Root Administrator
I see... this is possible. Admin have yet to test but I'm confident it will do the trick (and I'll report back)
 

koda

Well-Known Member
Jan 10, 2014
63
2
58
cPanel Access Level
Root Administrator
Ok reporting....
We did what suggested but it seems there are still issues...

It seems
/var/lib/mysql/myvirtualservername.local.pid
/var/lib/mysql/mailserver.mymailserver.com.pid

Are still there and the update fails again :(
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
To verify, are those PID files created automatically when MySQL restarts or are you unable to remove them?

Thank you.