Symptoms
When running updates or attempting to install a new package, you encounter an error similar to the following.
Error: Failed to download metadata for repo 'cloudlinux-x86_64-server-9': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Description
The error occurs when the configured repository is unreachable. Adding an additional mirror list can address this.
Workaround
-
Open the file "/etc/sysconfig/rhn/up2date" using your favorite editor and ensure the configuration matches the examples below.
serverURL=https://xmlrpc.cln.cloudlinux.com/XMLRPC mirrorURL=https://repo.cloudlinux.com/cloudlinux/mirrorlists/cln-mirrors clnServerURL=http://cln.cloudlinux.com/clweb/xmlrpc -
If you see this line exists in the file, you must either remove it or comment it out to prevent conflicts with the correct mirror URL.
mirrorURL=file:///etc/mirrorlist -
To automatically comment out the incorrect mirror URL line, run the following command:
sed -i '/^mirrorURL=file:\/\/\/etc\/mirrorlist/s/^/#/' /etc/sysconfig/rhn/up2date
Comments
0 comments
Article is closed for comments.