SOLVED YUM encountered errors outside of EasyApache 4

Operating System & Version
CentOS Linux release 7.9.2009 (Core)
cPanel & WHM Version
102.0.21

alanstar

Member
Jun 22, 2022
20
3
3
UK
cPanel Access Level
Root Administrator
We are running version 102.0.21. I'm currently unable to use the EasyApache 4 page as I get the following error: "YUM encountered errors outside of EasyApache 4. Log into the system via SSH to resolve them, or you can click the “Refresh” button to rebuild the system‘s cache."

I had a look at the logs and tracked it down to this:

[2022-09-22 06:34:02 +0100] info [xml-api] API failure: “/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_list_json", line 15, 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.7/site-packages/yum/repos.py", line 347, in populateSack
self.doSetup()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
self.retrieveAllMD()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
dl = repo._async and repo._commonLoadRepoXML(repo)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1482, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1259, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1042, in _getFile
raise e
yum.Errors.NoMoreMirrorsRepoError: failure: repodata/repomd.xml from mariadb: [Errno 256] No more mirrors to try.
http://yum.mariadb.org/10.2/rhel7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
w/ /usr/local/cpanel/bin/packman_get_list_json installed ea-
Often errors like this can be resolved by running `yum makecache`
[ea4_list_profiles] version [1].
[2022-09-22 06:34:06 +0100] info [xml-api] “/usr/bin/yum” reported error code “1” when it ended: w/ /usr/bin/yum makecache
Loaded plugins: fastestmirror, langpacks, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 185.15.22.168
* cpanel-addons-production-feed: 185.15.22.168
* cpanel-plugins: 185.15.22.168
* base: mirrors.vinters.com
* epel: mirrors.coreix.net
* extras: mirror.as29550.net
* remi-safe: mirrors.ukfast.co.uk
* updates: uk.mirrors.clouvider.net
http://yum.mariadb.org/10.2/rhel7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article


If above article doesn't help to resolve this issue please use My View - CentOS Bug Tracker.



One of the configured repositories failed (MariaDB),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=mariadb ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable mariadb
or
subscription-manager repos --disable=mariadb

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=mariadb.skip_if_unavailable=true

failure: repodata/repomd.xml from mariadb: [Errno 256] No more mirrors to try.
http://yum.mariadb.org/10.2/rhel7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

Often errors like this can be resolved by running `yum makecache`
[package_manager_fixcache] version [1].
I tried running "yum makecache" as it suggested but this resulted in the same error - I think your script is running the same command.

We get the same error in a nightly email titled "cPanel & WHM update failure in upcp script" that I posted about recently (https://forums.cpanel.net/threads/c...ure-in-upcp-script.700709/page-4#post-2937813). At that time it was happening randomly but now it is every day.

What do you suggest I try?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
Hey there! We did fix this in later versions of cPanel automatically, but since you're on version 102 you'll need to manually resolve this.

Can you run the following commands on the server and then see if "yum update" works well?

Code:
echo '142.4.217.28 yum.mariadb.org' >> /etc/hosts
yum clean all
yum makecache
yum update
 
Last edited:

alanstar

Member
Jun 22, 2022
20
3
3
UK
cPanel Access Level
Root Administrator
Hey there! We did fix this in later versions of cPanel automatically, but since you're on version 102 you'll need to manually resolve this.

Can you run the following commands on the server and then see if "yum update" works well?
Thanks, this has solved the problem.
 

cool_recep

Well-Known Member
Apr 10, 2013
88
7
58
cPanel Access Level
Website Owner
First of all, the code yum upate has a typo. Should be yum update.

And second, no , this did not solve my issue. I still get:

Imunify360 ea-php Hardened repository for CentO 171 B/s | 179 B 00:01
Error: Failed to download metadata for repo 'imunify360-ea-php-hardened': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
I fixed that typo - thanks for letting me know!

Are you able to manually reach the repository xml file? For example, on an AlmaLinux system, this would be the following URL:


so you could run this command from the server to see if you can download that file:

Code:
wget https://repo.imunify360.cloudlinux.com/defense360/el/8/updates/x86_64/repodata/repomd.xml
Can you try that and let us know if that works?
 

cityglow

Registered
Apr 21, 2023
4
0
1
Africa
cPanel Access Level
Root Administrator
Also facing this same issue after trying to install Node.js.
We followed the steps

yum clean all
yum makecache
yum update

At the bottom of the update output, this is what shows:

AlmaLinux 8 - PowerTools 5.7 MB/s | 3.4 MB 00:00
created by dnf config-manager from https://deb.nodesource.com/setup_16.x 1.6 MB/s | 155 kB 00:00
Error: Failed to download metadata for repo 'deb.nodesource.com_setup_16.x': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried



We have tried over and over but it is the same error that we get.

Please, does anyone know how we can get rid of this nodejs repo in order to get YUM back on?

It seams we were to download rpm instead of the debian in the command so this is causing conflict with yum?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
@cityglow - can you get me more details on how you tried to install NodeJS? Details on the cPanel-supported method are here:


but it would be good to know what steps were taken before we try and help you get things removed.
 

cityglow

Registered
Apr 21, 2023
4
0
1
Africa
cPanel Access Level
Root Administrator

Tried the installation via WHM interface but when you try to check with node -v in command prompt it doesn't show Node.js is installed.
We then tried the installation via command line. But our server is running Almalinux 8 so it seems we rather need rpm package not deb?

What we want now is to be able to remove that error and let EasyApache function normally. Later we can look at Node.js installation
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
I would not expect "node -v" to provide any output on a cPanel server, so that is normal.

To troubleshoot the RPM error, I would expect a "yum update" to show what the problem is, and then you could remove the offending package. If you need to disable that repository, you can do that from /etc/yum.repos.d manually, or you can run this command to disable it:

dnf config-manager --disable repository-id
 

cityglow

Registered
Apr 21, 2023
4
0
1
Africa
cPanel Access Level
Root Administrator
I would not expect "node -v" to provide any output on a cPanel server, so that is normal.

To troubleshoot the RPM error, I would expect a "yum update" to show what the problem is, and then you could remove the offending package. If you need to disable that repository, you can do that from /etc/yum.repos.d manually, or you can run this command to disable it:

dnf config-manager --disable repository-id
This is the output of "yum update"


AlmaLinux 8 - PowerTools 5.7 MB/s | 3.4 MB 00:00
created by dnf config-manager from https://deb.nodesource.com/setup_16.x 1.6 MB/s | 155 kB 00:00
Error: Failed to download metadata for repo 'deb.nodesource.com_setup_16.x': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried



Please, based on the above output, what is the repository -id?
dnf config-manager --disable repository-id
 

cityglow

Registered
Apr 21, 2023
4
0
1
Africa
cPanel Access Level
Root Administrator
This is the output of "yum update"


AlmaLinux 8 - PowerTools 5.7 MB/s | 3.4 MB 00:00
created by dnf config-manager from https://deb.nodesource.com/setup_16.x 1.6 MB/s | 155 kB 00:00
Error: Failed to download metadata for repo 'deb.nodesource.com_setup_16.x': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried



Please, based on the above output, what is the repository -id?
dnf config-manager --disable repository-id

Thank you very much for the support. Have manually disabled the repository by editing the repository's file.

[deb.nodesource.com_setup_16.x]
name=created by dnf config-manager from https://deb.nodesource.com/setup_16.x
baseurl=https://deb.nodesource.com/setup_16.x
enabled=0


The last line was "enabled=1" so, the 1 was changed to 0 to disable it and EasyApache interface came back on and yum update ran successfully.

We then reinstalled node.js via WHM interface EasyApache4 .....
When we go to the command line to start nocodb which requires nodejs, we get the error: /usr/bin/env: ‘node’: No such file or directory

That was the same reason why we thought the WHM interface nodejs installation wasn't working.