cPanel & WHM update failure in upcp script

JohnATK

Registered
Feb 1, 2022
4
0
1
Palestine
cPanel Access Level
Root Administrator
Hello guys,

I am running WHM Version: 102.0.1 and AlmaLinux v8.5.0 STANDARD kvm. Recently migrated from CentOS.

I have the below problem that I cannot seem to solve:

The cPanel & WHM update process failed for the following reason:
Maintenance ended; however, it did not exit cleanly (256). The following events were logged: “scripts/findphpversion”. Review the update logs to determine why the update failed.

Code:
...
...
[2022-01-31 22:05:27 +0200] E [/usr/local/cpanel/scripts/findphpversion] “/usr/local/cpanel/bin/python-packman” reported error code “1” when it ended: Errors during downloading metadata for repository 'BaseOS':
[2022-01-31 22:05:27 +0200] E [/usr/local/cpanel/scripts/findphpversion] - Status code: 404 for http://asi-fs-d.contabo.net/centos/8/BaseOS/x86_64/os/repodata/repomd.xml (IP: 213.136.72.159)
[2022-01-31 22:05:27 +0200] E [/usr/local/cpanel/scripts/findphpversion] Traceback (most recent call last):
[2022-01-31 22:05:27 +0200] E [/usr/local/cpanel/scripts/findphpversion] File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 574, in load
...
[2022-01-31 22:05:31 +0200] Processing: Updating plugins data cache
[2022-01-31 22:05:31 +0200] - Processing command `/usr/local/cpanel/bin/refresh_plugin_cache`
[2022-01-31 22:05:31 +0200] - Finished command `/usr/local/cpanel/bin/refresh_plugin_cache` in 0.015 seconds
[2022-01-31 22:05:31 +0200] Processing: Ensuring SSL certificate information for CCS is up to date.
[2022-01-31 22:05:31 +0200] - Processing command `/usr/local/cpanel/scripts/ccs-check --run --ssl`
[2022-01-31 22:05:31 +0200] - Finished command `/usr/local/cpanel/scripts/ccs-check --run --ssl` in 0.006 seconds
[2022-01-31 22:05:31 +0200] Processing: Ensure cpanel-plugins yum repo exists
[2022-01-31 22:05:31 +0200] - Finished in 0.508 seconds
[2022-01-31 22:05:31 +0200] Processing: Checking Addon Licenses
[2022-01-31 22:05:31 +0200] - Finished in 0.002 seconds
[2022-01-31 22:05:31 +0200] Processing: Updating Public Suffix List
[2022-01-31 22:05:31 +0200] Processing: Checking End Of Life for current version.
[2022-01-31 22:05:31 +0200] - Finished in 0.094 seconds
[2022-01-31 22:05:31 +0200] Processing:
[2022-01-31 22:05:31 +0200] Maintenance complete.
=> Log closed Mon Jan 31 22:05:31 2022
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (1631720) at Mon Jan 31 22:05:31 2022
When I perform the "dnf makecache", I get the following:
Code:
CentOS-8 - Base                                                                                       81 kB/s | 282  B     00:00
Error: Failed to download metadata for repo 'BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
When I do "System Update" from WHM, I get the following:
Code:
System update process has started.

“/usr/bin/dnf” reported error code “1” when it ended:  w/ /usr/bin/dnf upgrade -y
CentOS-8 - Base                                  84 kB/s | 282  B     00:00  
<span class='text-danger'>Error: Failed to download metadata for repo 'BaseOS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried</span>

Often errors like this can be resolved by running `dnf makecache`

System update process has finished
Any ideas how to fix this?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,431
1,634
363
cPanel Access Level
Root Administrator
Hey there! I see that you mention running AlmaLinux, but the output you've provided certainly looks like the system thinks it is running CentOS, which is no longer supported and would explain those errors:


It's also possible there are files in /etc/yum.repos.d that are still referencing CentOS 8, depending on how that migration was performed, so if you are sure you are running AlmaLinux, I'd check the repository files there for any lingering references to the old operating system.
 

JohnATK

Registered
Feb 1, 2022
4
0
1
Palestine
cPanel Access Level
Root Administrator
Hey there! I see that you mention running AlmaLinux, but the output you've provided certainly looks like the system thinks it is running CentOS, which is no longer supported and would explain those errors:


It's also possible there are files in /etc/yum.repos.d that are still referencing CentOS 8, depending on how that migration was performed, so if you are sure you are running AlmaLinux, I'd check the repository files there for any lingering references to the old operating system.
Thank you for your reply!

I used cPanel's guide to convert from CentOS to AlmaLinux, and followed the same steps.

When I LS /etc/yum.repos.d, here is what I get:
Code:
almalinux-ha.repo          almalinux.repo                   CentOS-Base.repo                      cpanel-plugins.repo  epel-playground.repo       epel-testing.repo
almalinux-plus.repo        almalinux-resilientstorage.repo  CentOS-Linux-PowerTools.repo.rpmsave  EA4.repo             epel.repo                  kernelcare.repo
almalinux-powertools.repo  CentOS-AppStream.repo            cPAddons.repo
Which ones should I delete? and do I do it using the rm command, or I need to do something else/extra?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
10,431
1,634
363
cPanel Access Level
Root Administrator
I wouldn't *delete* any of them, but I would move some out of the way for testing. I'd do this to move the files out of the way, update the Yum cache, and test an update, and see if that works well:

Code:
mkdir /root/old_repos
mv /etc/yum.repos.d/CentOS-Base.repo /root/old_repos/CentOS-Base.repo 
yum clean all
yum update
That way if something does go wrong you can still move it back.
 

JohnATK

Registered
Feb 1, 2022
4
0
1
Palestine
cPanel Access Level
Root Administrator
That's probably the wisest to do, I agree. So I did this, and for the following after yum update:

Code:
EA4 ( EasyApache 4 ) 1.8 MB/s | 2.7 MB     00:01
cPanel Addons Production Feed 17 kB/s | 8.9 kB     00:00
cPanel Plugins project 395 kB/s | 423 kB     00:01
CentOS-8 - AppStream 77 kB/s | 282  B     00:00
Error: Failed to download metadata for repo 'AppStream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
It's also worth mentioning that "yum clean all" resulted in "0 files removed".

What are we missing? to move the AppStream now too?