cPanel & WHM update failure in upcp script

garconcn

Well-Known Member
Oct 29, 2009
172
18
68
I received a lot of error too

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.





Update log preview:​
...
...
[2022-06-07 21:23:38 -0700] E [/usr/local/cpanel/scripts/findphpversion] “/usr/local/cpanel/bin/python-packman” reported error code “1” when it ended: Traceback (most recent call last):
[2022-06-07 21:23:38 -0700] E [/usr/local/cpanel/scripts/findphpversion] File "/usr/local/cpanel/bin/packman_get_info_json", line 16, in <module>
[2022-06-07 21:23:38 -0700] E [/usr/local/cpanel/scripts/findphpversion] packman.init_yum()
[2022-06-07 21:23:38 -0700] E [/usr/local/cpanel/scripts/findphpversion] File "/usr/local/cpanel/bin/packman_lib/yum_impl.py", line 78, in init_yum
...
[2022-06-07 21:24:28 -0700] Processing: Updating plugins data cache
[2022-06-07 21:24:28 -0700] - Processing command `/usr/local/cpanel/bin/refresh_plugin_cache`
[2022-06-07 21:24:29 -0700] - Finished command `/usr/local/cpanel/bin/refresh_plugin_cache` in 0.224 seconds
[2022-06-07 21:24:29 -0700] Processing: Ensuring SSL certificate information for CCS is up to date.
[2022-06-07 21:24:29 -0700] - Processing command `/usr/local/cpanel/scripts/ccs-check --run --ssl`
[2022-06-07 21:24:29 -0700] - Finished command `/usr/local/cpanel/scripts/ccs-check --run --ssl` in 0.019 seconds
[2022-06-07 21:24:29 -0700] Processing: Ensure cpanel-plugins yum repo exists
[2022-06-07 21:24:29 -0700] - Finished in 0.300 seconds
[2022-06-07 21:24:29 -0700] Processing: Checking Addon Licenses
[2022-06-07 21:24:29 -0700] - Finished in 0.012 seconds
[2022-06-07 21:24:29 -0700] Processing: Updating Public Suffix List
[2022-06-07 21:24:29 -0700] Processing: Checking End Of Life for current version.
[2022-06-07 21:24:29 -0700] - Finished in 0.278 seconds
[2022-06-07 21:24:29 -0700] Processing:
[2022-06-07 21:24:29 -0700] Maintenance complete.
=> Log closed Tue Jun 7 21:24:29 2022
----------------------------------------------------------------------------------------------------
=> Log opened from cPanel Update (upcp) - Slave (23608) at Tue Jun 7 21:24:29 2022
 

garconcn

Well-Known Member
Oct 29, 2009
172
18
68
I don't see any error after run "/scripts/upcp --force". Why multiple servers show the same error in last Maintenance? Is there an issue on our server or cpanel side?

Just curious, does cpanel receive a copy of the update failure log for analysis? If not, I suggest you consider that(not the whole log file, but at least the error part). We can only see the error from our own servers, but cpanel can see from all. It will be easier for cpanel to conclude whether the issue is sole case or affect everyone.
 
Last edited:
  • Like
Reactions: Spirogg

garconcn

Well-Known Member
Oct 29, 2009
172
18
68
Not on all servers, I received this error on 12 servers, they run on different OS(cloudlinux 6, 7 and CentOS 7).
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
I am receiving this same error on my CloudLinux v6.10.0 server.. when I run /scripts/findphpversion I am getting:


“/usr/local/cpanel/bin/python-packman” reported error code “1” when it ended: Traceback (most recent call last):
File "/usr/local/cpanel/bin/packman_get_info_json", line 16, in <module>
packman.init_yum()
File "/usr/local/cpanel/bin/packman_lib/yum_impl.py", line 78, in init_yum
yb.repos.populateSack()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 324, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1263, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1462, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1458, in _getRepoXML
raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: wp-toolkit-cpanel. Please verify its path and try again
w/ /usr/local/cpanel/bin/packman_get_info_json ea-php74
Often errors like this can be resolved by running `yum makecache`


Running yum makecache did not help, nor did running an upcp --force (same error).
 
Last edited:

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
@sHORTYWZ - before you ran "yum makecache" did you run "yum clean all"?
Just did, output of makecache following clean all:

https://wp-toolkit.plesk.com/cPanel/CentOS-6-x86_64/5.11.2/wp-toolkit/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with CloudLinux Support.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: wp-toolkit-cpanel. Please verify its path and try again
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,764
1,869
363
cPanel Access Level
Root Administrator
That's interesting - the first thing I would try would be to disable the WordPress Toolkit repository:

Code:
yum-config-manager --disable wp-toolkit-cpanel
and then try the update again with this:

Code:
yum clean all
yum makecache
yum update
If that doesn't work that could indicate deeper issues with the RPM system. If there are still errors you can try the WHM >> Rebuild RPM Database tool.
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
That's interesting - the first thing I would try would be to disable the WordPress Toolkit repository:

Code:
yum-config-manager --disable wp-toolkit-cpanel
and then try the update again with this:

Code:
yum clean all
yum makecache
yum update
If that doesn't work that could indicate deeper issues with the RPM system. If there are still errors you can try the WHM >> Rebuild RPM Database tool.
Had to disable one more repo, and we're back in business now:
Code:
yum-config-manager --disable wp-toolkit-thirdparties
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,764
1,869
363
cPanel Access Level
Root Administrator
I'm glad that worked - I'd still expect those repositories to work though, so it might be worth checking their contents. Here's the output of my wp-toolkit-cpanel file:

Code:
[wp-toolkit-cpanel]
name=WordPress Toolkit for cPanel
baseurl=https://wp-toolkit.plesk.com/cPanel/CentOS-8-x86_64/5.11.2/wp-toolkit/
enabled=1
gpgcheck=1

[wp-toolkit-thirdparties]
name=WordPress Toolkit third parties
baseurl=https://wp-toolkit.plesk.com/cPanel/CentOS-8-x86_64/5.11.2/thirdparty/
enabled=1
gpgcheck=1
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
I'm glad that worked - I'd still expect those repositories to work though, so it might be worth checking their contents. Here's the output of my wp-toolkit-cpanel file:

Code:
[wp-toolkit-cpanel]
name=WordPress Toolkit for cPanel
baseurl=https://wp-toolkit.plesk.com/cPanel/CentOS-8-x86_64/5.11.2/wp-toolkit/
enabled=1
gpgcheck=1

[wp-toolkit-thirdparties]
name=WordPress Toolkit third parties
baseurl=https://wp-toolkit.plesk.com/cPanel/CentOS-8-x86_64/5.11.2/thirdparty/
enabled=1
gpgcheck=1
Your repo is set up with CentOS-8-x86_64, whereas mine (CloudLinux6) is CentOS-6-x86_64 - it looks like this repo stops at version 5.10 (which makes sense, as there is a deprecation notice in the WP Toolkit plugin), but it seems a code change needs to happen on the cPanel side to stop looking for newer versions of the yum repo.

1655147306493.png

1655147365668.png
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,764
1,869
363
cPanel Access Level
Root Administrator
Oh, I wouldn't expect anything to work unless you have the extended support option through CloudLinux. You'll likely continue to run into repo issues if that is the case:


What version of cPanel are you using on that machine?
 

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
Oh, I wouldn't expect anything to work unless you have the extended support option through CloudLinux. You'll likely continue to run into repo issues if that is the case:


What version of cPanel are you using on that machine?
This box is CloudLinux6 extended - is the bug on their side perhaps, then? Not sure where the repo management responsibilities lie.

Operating System: CloudLinux v6.10.0
Product: cPanel & WHM v104.0.4 (STANDARD)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,764
1,869
363
cPanel Access Level
Root Administrator
I reached out to our developers and Plesk is not currently building a newer version, as they manage that repository, except for critical security updates as mentioned in that notification in the interface. In order to suppress the warning messages you can enable the repositories but change the URL to use the "latest" version, instead of the specific version that it's trying to update to:

 

sHORTYWZ

Well-Known Member
Dec 14, 2003
57
3
158
I reached out to our developers and Plesk is not currently building a newer version, as they manage that repository, except for critical security updates as mentioned in that notification in the interface. In order to suppress the warning messages you can enable the repositories but change the URL to use the "latest" version, instead of the specific version that it's trying to update to:

Perfect - thank you!