Overview
When running system updates or installing new packages on a CloudLinux server, you may encounter an error indicating that the repository metadata cannot be downloaded.
Example error message:
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
Cause
This issue occurs when the CloudLinux repository server cannot be reached. It may be temporary (network/connectivity) or related to the repository configuration on your server. Adding an additional mirror list can resolve the problem.
Resolution
Follow these steps to fix the issue:
-
Log in to the server as the root user, either via SSH or through WHM → Terminal.
-
Run the following commands one by one:
echo https://xmlrpc.cln.cloudlinux.com/XMLRPC >> /etc/mirrorlist echo mirrorURL=file:///etc/mirrorlist >> /etc/sysconfig/rhn/up2date dnf clean all dnf makecache -
Once complete, retry your update or package installation.
Additional Notes
-
If the error persists, verify that your server can connect to the internet and that outbound connections to CloudLinux update servers are not being blocked by a firewall.
-
This workaround ensures your system uses the local mirror list file if default mirrors fail.
