cPanel & WHM update failure in upcp script – The following events were logged: “scripts/update-packages”.

Background

If you have many cPanel servers you’ll find from time to time they don’t update. This is unfortunately a more common problem than usual.

TL;DR run the command manually and look at the around 25% mark for things to go wrong.

/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron

Detailed information

Here is the email received:

Subject: [server.example.com] cPanel & WHM update failure in upcp script

Body:
Maintenance ended; however, it did not exit cleanly (256). The following events were logged: “scripts/update-packages”. Review the update logs to determine why the update failed.
That’s followed by a snippet of a the upgrade gone wrong which is generally always useless because it doesn’t contain the right information. Instead, you have to SSH to the server or use the Terminal menu and then manually execute the upgrade to see what’s wrong. Or you can log a ticket.
The process that does the update is in the CRON:
45 23 * * * (/usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp --cron > /dev/null)
Here we are manually doing the upgrade:
# /usr/local/cpanel/scripts/fix-cpanel-perl; /usr/local/cpanel/scripts/upcp
[2024-10-11 05:55:29 +0000] Detected cron=0 (Terminal detected)
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (4115414) at Fri Oct 11 05:55:29 2024
[2024-10-11 05:55:29 +0000] Detected cron=0 (Terminal detected)
[2024-10-11 05:55:30 +0000] 1% complete
...
Eventually:
[2024-10-11 05:56:42 +0000] Processing: Checking End Of Life for current version.
[2024-10-11 05:56:43 +0000] - Finished in 0.393 seconds
[2024-10-11 05:56:43 +0000] Processing:
[2024-10-11 05:56:43 +0000] Maintenance complete.
=> Log closed Fri Oct 11 05:56:43 2024
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (4115414) at Fri Oct 11 05:56:43 2024
[2024-10-11 05:56:44 +0000] E Pre Maintenance ended, however it did not exit cleanly (256). The following events were logged: "scripts/update-packages". Please check the logs for an indication of what happened
[2024-10-11 05:56:46 +0000] 95% complete
[2024-10-11 05:56:46 +0000] Running Standardized hooks
[2024-10-11 05:56:46 +0000] 100% complete
[2024-10-11 05:56:46 +0000]
[2024-10-11 05:56:46 +0000] cPanel update completed
[2024-10-11 05:56:46 +0000] A log of this update is available at /var/cpanel/updatelogs/update.4115414.682072283.1721805407.log
[2024-10-11 05:56:46 +0000] Removing upcp pidfile
[2024-10-11 05:56:46 +0000]
[2024-10-11 05:56:46 +0000] Completed all updates
=> Log closed Fri Oct 11 05:56:46 2024
As clear as mud right? Next, we check the log file:
cat /var/cpanel/updatelogs/update.4115414.682072283.1721805407.log
Huh? This repeats the log we see on the console. So let’s circle back to this beauty:
The following events were logged: “scripts/update-packages”.
yum clean all
yum update
Then we see this:
Error:
Problem: package leapp-upgrade-el7toel8-1:0.21.0-2.el7.elevate.2.noarch from elevate requires leapp-repository-dependencies = 10, but none of the providers can be installed
- cannot install the best update candidate for package leapp-upgrade-el7toel8-1:0.19.0-7.1.el7.noarch
- nothing provides policycoreutils-python needed by leapp-upgrade-el7toel8-deps-1:0.21.0-2.el7.elevate.2.noarch from elevate
- nothing provides python-requests needed by leapp-upgrade-el7toel8-deps-1:0.21.0-2.el7.elevate.2.noarch from elevate
- nothing provides python-pyudev needed by leapp-upgrade-el7toel8-deps-1:0.21.0-2.el7.elevate.2.noarch from elevate
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Life’s too short. Logging a ticket.
Some months later after logging a ticket. The tech reported this:
If no longer in use it may be necessary to remove the package so that you can resolve the issues with YUM that occur during cPanel’s update process (upcp). Information on the RPM package can be found below:

rpm -qi leapp-upgrade-el7toel8

In the latest incarnation of the LEAP mess:

[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] Error:
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] Problem 1: package python2-leapp-0.18.0-2.el7.noarch from elevate requires leapp-framework-dependencies = 6, but none of the providers can be installed
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - cannot install the best update candidate for package python2-leapp-0.18.0-1.el7.noarch
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides PyYAML needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-requests needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-setuptools needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-six needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] Problem 2: package leapp-0.18.0-2.el7.noarch from elevate requires python2-leapp = 0.18.0-2.el7, but none of the providers can be installed
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - package python2-leapp-0.18.0-2.el7.noarch from elevate requires leapp-framework-dependencies = 6, but none of the providers can be installed
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - cannot install the best update candidate for package leapp-0.18.0-1.el7.noarch
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides PyYAML needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-requests needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-setuptools needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] - nothing provides python-six needed by leapp-deps-0.18.0-2.el7.noarch from elevate
[2025-01-29 03:17:36 +0100] [/usr/local/cpanel/scripts/update-packages] (XID 35ype2) “/usr/bin/yum” reported error code “1” when it ended:

Well Red hat has the fix:

https://access.redhat.com/solutions/7010688

But you have to pay.

You can try and remove python2-leapp-0.18.0-2.el7.noarch, but it’s not installed.

I made a typo but then I got this useful output under “installed” packages:

dnf list availble python2-*
Last metadata expiration check: 0:00:27 ago on Wed 29 Jan 2025 03:33:37 AM CET.
Installed Packages
python2-babel.noarch 2.5.1-10.module_el8.6.0+2781+fed64c13 @System
python2-backports.x86_64 1.0-16.module_el8.6.0+2781+fed64c13 @System
python2-backports-ssl_match_hostname.noarch 3.5.0.1-12.module_el8.6.0+2781+fed64c13 @System
python2-chardet.noarch 3.0.4-10.module_el8.6.0+2781+fed64c13 @System
python2-devel.x86_64 2.7.18-17.module_el8.10.0+3783+2756348e.alma @appstream
python2-docs.noarch 2.7.16-2.module_el8.6.0+2781+fed64c13 @System
python2-docutils.noarch 0.14-12.module_el8.6.0+2781+fed64c13 @System
python2-idna.noarch 2.5-7.module_el8.6.0+2781+fed64c13 @System
python2-ipaddress.noarch 1.0.18-6.module_el8.6.0+2781+fed64c13 @System
python2-jinja2.noarch 2.10-10.module_el8.10.0+3783+2756348e @appstream
python2-leapp.noarch 0.18.0-1.el7 @elevate

Next we learn it’s at the 25% mark that these things fail.

It turns out  a year ago, when I elevated this machine, there is still lying crap around causing WHM upgrades to fail.

This was the final solution:

dnf list python2-*
dnf list leapp*
rpm -e leapp.noarch
rpm -e leapp-deps-el8.noarch
rpm -e leapp-repository-deps-el8.noarch
/usr/local/cpanel/scripts/upcp

On the original support ticket this was the solution:

rpm -e --nodeps leapp-upgrade-el7toel8

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top