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.
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.