Nirjonadda

Well-Known Member
May 8, 2013
735
27
78
cPanel Access Level
Root Administrator
I am getting The last attempt to update cPanel & WHM was blocked. Please let me know, How to fixing on this error issue?

Details: Reasons for blocked updates.

Please correct these issues and rerun updates.
fatal: Cannot upgrade because yum is locked (/var/run/yum.pid has existed for 10+ minutes).

[2015-10-07 07:35:48 -0400] Maintenance complete.
=> Log closed Wed Oct 7 07:35:48 2015
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (9545) at Wed Oct 7 07:35:48 2015
[2015-10-07 07:35:48 -0400] Maintenance completed successfully
[2015-10-07 07:35:49 -0400] Running Standardized hooks
[2015-10-07 07:35:49 -0400]
[2015-10-07 07:35:49 -0400] cPanel update completed
[2015-10-07 07:35:49 -0400] A log of this update is available at /var/cpanel/updatelogs/update.1444216887.log
[2015-10-07 07:35:49 -0400] Removing upcp pidfile
[2015-10-07 07:35:49 -0400] W NOTE: A system upgrade was not possible due to the following blockers:
[2015-10-07 07:35:49 -0400] W [FATAL] - Cannot upgrade because yum is locked (/var/run/yum.pid has existed for 10+ minutes).
=> Log closed Wed Oct 7 07:35:49 2015
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
Cannot upgrade because yum is locked
Code:
# ps aux |grep yum|grep -Ev grep
What does that provide.

If nothing.
Code:
# rm -f /var/run/yum.pid
# yum clean all
# /scripts/upcp --force
 

Nirjonadda

Well-Known Member
May 8, 2013
735
27
78
cPanel Access Level
Root Administrator
This post by cPanelMichael may be of some use to you:
Cpanel version change is blocked - cPanel Forums
Does not work. Please let me know.

Code:
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Sat Oct  3 10:25:00 2015 from 151.55.132.147
[email protected] [~]# ps aux|grep rpm
root     13712  0.0  0.0 103300   868 pts/0    S+   09:31   0:00 grep rpm
[email protected] [~]# ps aux|grep yum
root     13718  0.0  0.0 103300   872 pts/0    S+   09:31   0:00 grep yum
[email protected] [~]# mkdir /root/old_rpm_dbs/
[email protected] [~]# mv /var/lib/rpm/__db* /root/old_rpm_dbs/
[email protected] [~]# rpm --rebuilddb
[email protected] [~]# yum update
Loaded plugins: fastestmirror, tsflags, universal-hooks
Setting up Update Process
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 300, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 146, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 440, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 233, in doCommand
    return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
  File "/usr/share/yum-cli/cli.py", line 728, in updatePkgs
    self.update()
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3791, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 926, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 744, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 907, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 687, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 295, in populateSack
    self.doSetup()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 110, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 185, in postreposetup_hook
    read_timedhosts()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 269, in read_timedhosts
    host, time = line.split()
ValueError: too many values to unpack
[email protected] [~]#
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello :)

Try running the following command to see if it allows "yum update" to succeed:

Code:
yum clean all
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
I am happy to see that command helped. Thank you for updating us with the outcome.