CentOS – Cannot Retrieve Repository Metadata (repomd.xml) for 10gen

centosrepository

I just started having this issue today. Any ideas?

[root@centos-4gb-nyc2-01 ~]# yum upgrade
Loaded plugins: fastestmirror, replace
Setting up Upgrade Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                         |  15 kB     00:00
 * base: mirror.atlanticmetro.net
 * epel: epel.mirror.constant.com
 * extras: mirror.atlanticmetro.net
 * remi-php72: repo1.ash.innoscale.net
 * remi-safe: repo1.ash.innoscale.net
 * rpmforge: repoforge.spinellicreations.com
 * updates: mirror.atlanticmetro.net
 * webtatic: us-east.repo.webtatic.com
http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/repodata/repomd.xml: [Errno 14] Downloaded more than max size for https://www.mongodb.com/: 125776 > 102400
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: 10gen. Please verify its path and try again
[root@centos-4gb-nyc2-01 ~]#

Best Answer

The Package was corrupted so the actual size of the package differ form the one available in repodata. As the actual size of package and the one in repodata differs yum fail to download the package.

Try to delete and again download the problematic package in the local repository. Regenerate repodata for local repository:

# createrepo --update /path/to/rpms

On the Client System clear the yum cache and again try to install the package:

# yum clean all

# yum -y install

In your case downloads-distro.mongodb.org url repo meta is corrupted, you need to recreate it.

Hope this will help.