Cannot download repodata/repomd.xml: All mirrors were tried

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:

  1. Log in to the server as the root user, either via SSH or through WHM → Terminal.

  2. 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
    
  3. 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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix lveinfo database error of CLN

Run the following command: service lvestats stoptar -zcvf /root/lveinfo_backup_$(date...

How to Install KernelCare on cPanel/WHM server

To install KernelCare, you need to log in with the root user on your cPanel server. Check for...

Switching all cPanel acc/s to "inherit" PHP version

You can change all cPanel users to inherit with this CLI command: for each in `cat...

How to fix issues like PHP selector not available

Some of our clients face the issues like "PHP selector not available" on cPanel accounts of their...

How to fix boot problem because of CLN kernel

Some of our clients contacted us recently about the boot problem of their server after installing...