Ошибка cannot retrieve repository metadata repomd xml for repository

In my case, which is really exceptional, the location of the XML file which contains the repo information is changed.

  • I have Internet connection (ping 8.8.8.8 works)
  • When I run yum upgrade, after a lot of 404 error, I can get the names of packages I must download, but I cannot download them.

And, when I browse into the first 404 repo URL, which is:

http://mirror.airenetworks.es/CentOS/7.4.1708/os/x86_64/repodata/repomd.xml

and I see it absent. Going to its parent folder http://mirror.airenetworks.es/CentOS/7.4.1708/readme I get this:

This directory (and version of CentOS) is deprecated. For normal users,
you should use /7/ and not /7.4.1708/ in your path. Please see this FAQ
concerning the CentOS release scheme:

https://wiki.centos.org/FAQ/General

If you know what you are doing, and absolutely want to remain at the 7.4.1708
level, go to http://vault.centos.org/ for packages.

Please keep in mind that 7.4.1708 no longer gets any updates, nor
any security fix’s.

So, I have to go back to /etc/yum.repo.d to edit the files.

I have:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

I suspect that $releasever is no more in use, so I can test by changing it to 7:(remember to escape & with )

curl http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=arch

we can get a list of files:

ftp://ftp.cesca.cat/centos/7.5.1804/os/x86_64/
http://ftp.rediris.es/mirror/CentOS/7.5.1804/os/x86_64/
http://ftp.cica.es/CentOS/7.5.1804/os/x86_64/
http://centos.mirror.minorisa.net/7.5.1804/os/x86_64/
http://repo.nixval.com/CentOS/7.5.1804/os/x86_64/
http://centos.uvigo.es/7.5.1804/os/x86_64/
http://ftp.uma.es/mirror/CentOS/7.5.1804/os/x86_64/
http://ftp.cixug.es/CentOS/7.5.1804/os/x86_64/
http://mirror.airenetworks.es/CentOS/7.5.1804/os/x86_64/
http://mirror.gadix.com/centos/7.5.1804/os/x86_64/

So, we can set the variable like this:

  1. Open the /etc/yum.repo.d/CentOS-Base.repo
  2. In the [base] section, define: releasever=7.
  3. Re-run yum upgrade or yum install xxx.

In my case, which is really exceptional, the location of the XML file which contains the repo information is changed.

  • I have Internet connection (ping 8.8.8.8 works)
  • When I run yum upgrade, after a lot of 404 error, I can get the names of packages I must download, but I cannot download them.

And, when I browse into the first 404 repo URL, which is:

http://mirror.airenetworks.es/CentOS/7.4.1708/os/x86_64/repodata/repomd.xml

and I see it absent. Going to its parent folder http://mirror.airenetworks.es/CentOS/7.4.1708/readme I get this:

This directory (and version of CentOS) is deprecated. For normal users,
you should use /7/ and not /7.4.1708/ in your path. Please see this FAQ
concerning the CentOS release scheme:

https://wiki.centos.org/FAQ/General

If you know what you are doing, and absolutely want to remain at the 7.4.1708
level, go to http://vault.centos.org/ for packages.

Please keep in mind that 7.4.1708 no longer gets any updates, nor
any security fix’s.

So, I have to go back to /etc/yum.repo.d to edit the files.

I have:

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

I suspect that $releasever is no more in use, so I can test by changing it to 7:(remember to escape & with )

curl http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=arch

we can get a list of files:

ftp://ftp.cesca.cat/centos/7.5.1804/os/x86_64/
http://ftp.rediris.es/mirror/CentOS/7.5.1804/os/x86_64/
http://ftp.cica.es/CentOS/7.5.1804/os/x86_64/
http://centos.mirror.minorisa.net/7.5.1804/os/x86_64/
http://repo.nixval.com/CentOS/7.5.1804/os/x86_64/
http://centos.uvigo.es/7.5.1804/os/x86_64/
http://ftp.uma.es/mirror/CentOS/7.5.1804/os/x86_64/
http://ftp.cixug.es/CentOS/7.5.1804/os/x86_64/
http://mirror.airenetworks.es/CentOS/7.5.1804/os/x86_64/
http://mirror.gadix.com/centos/7.5.1804/os/x86_64/

So, we can set the variable like this:

  1. Open the /etc/yum.repo.d/CentOS-Base.repo
  2. In the [base] section, define: releasever=7.
  3. Re-run yum upgrade or yum install xxx.

Following error occurred when I’m trying to update using «yum» command.
There’s no any Internet connection issue. I just tried to get access to get solution from Error message given Red-Hat Article. but
that Red-Hat knowledge-base support for active subscribers only.

[cloudera@quickstart /]$ sudo yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                                 | 3.9 kB     00:00     
 * base: ftp.iitm.ac.in
 * epel: mirror2.totbb.net
 * extras: ftp.iitm.ac.in
 * updates: ftp.iitm.ac.in
 * webtatic: sp.repo.webtatic.com
http://install.linux.ncsu.edu/pub/yum/itecs/public/chromium/6/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: chromium. Please verify its path and try again
[cloudera@quickstart /]$    

asked Oct 6, 2017 at 8:53

sunone5's user avatar

I managed to solve this issue by doing this .


[cloudera@quickstart ~]$ cd /
[cloudera@quickstart /]$ cd etc/yum.repos.d
[cloudera@quickstart yum.repos.d]$ sudo vi chromium.repo

Edit the «enabled=1» line in bellow text chunk in chromium.repo file
as «enabled=0»


[chromium]
name=chromium for RHEL Linux $releasever - $basearch - Base
baseurl=http://install.linux.ncsu.edu/pub/yum/itecs/public/chromium/$releasever/
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic1 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic2

[chromium-source]
name=chromium for RHEL Linux $releasever - $basearch - Source
baseurl=http://install.linux.ncsu.edu/pub/yum/itecs/public/chromium/$releasever/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic1 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-chromiumpublic2
gpgcheck=1

Then tried the «sudo yum update all» command as following. it’s now
worked for me

[cloudera@quickstart ~]$ 
[cloudera@quickstart ~]$ sudo yum update all
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                                                 | 3.9 kB     00:00     
 * base: ftp.iitm.ac.in
 * epel: mirror2.totbb.net
 * extras: ftp.iitm.ac.in
 * updates: ftp.iitm.ac.in
 * webtatic: sp.repo.webtatic.com
chromium-el6                                                                                                                                                                  | 1.9 kB     00:00     
chromium-el6/primary_db                                                                                                                                                       |  17 kB     00:00     
cloudera-cdh5                                                                                                                                                                 |  951 B     00:00     
cloudera-cdh5/primary                                                                                                                                                         |  43 kB     00:00     
cloudera-cdh5                                                                                                                                                                                146/146
cloudera-gplextras5                                                                                                                                                           |  951 B     00:00     
cloudera-gplextras5/primary                                                                                                                                                   | 2.4 kB     00:00     
cloudera-gplextras5                                                                                                                                                                              9/9
cloudera-kafka                                                                                                                                                                |  951 B     00:00     
cloudera-manager                                                                                                                                                              |  951 B     00:00     
cloudera-manager/primary                                                                                                                                                      | 4.3 kB     00:00     
cloudera-manager                                                                                                                                                                                 7/7
epel                                                                                                                                                                          | 4.3 kB     00:00     
http://mirror2.totbb.net/epel/6/x86_64/repodata/repomd.xml: [Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.
epel                                                                                                                                                                          | 4.3 kB     00:00     
epel/primary_db                                                                                                                                                               | 5.9 MB     00:22     
extras                                                                                                                                                                        | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                             |  29 kB     00:00     
updates                                                                                                                                                                       | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                            | 4.2 MB     00:02     
webtatic                                                                                                                                                                      | 3.6 kB     00:00     
webtatic/primary_db                                                                                                                                                           | 208 kB     00:00     
No Match for argument: all
No package all available.
No Packages marked for Update
[cloudera@quickstart ~]$

answered Oct 6, 2017 at 9:13

sunone5's user avatar

sunone5sunone5

3752 gold badges5 silver badges14 bronze badges

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Network Satellite or Proxy 5.4 or later

Issue

  • Yum update fails with :
Error: Cannot retrieve repository metadata (repomd.xml) for repository: XXXX. Please verify its path and try again

Resolution

  • Verify that the Satellite or Proxy server has a fully-qualified domain name (FQDN), and that the CommonName (CN) in the SSL certificate used by Apache is set to the FQDN:

    • For a self-signed Satellite certificate, the CN field should be FQDN for Issuer and Subject and these two fields should be matching,

      # grep CN /etc/httpd/conf/ssl.crt/server.crt
      Issuer: C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com
      Subject: C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com/emailAddress=admin@example.com
      
    • For a third-party SSL certificate, the CN field should be FQDN in Subject,

      Subject: C=US, ST=North Carolina, O=Example Corp. Inc., OU=unit, CN=satellite.example.com/emailAddress=admin@example.com
      
  • Also verify that the ssl.conf configuration file is pointing to the correct files:

    # grep ^SSLCert /etc/httpd/conf.d/ssl.conf
    SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
    
  • Ensure that serverURL in the client system’s /etc/sysconfig/rhn/up2date file uses the FQDN of the Satellite or Proxy server, e.g.:

    serverURL=https://satellite.example.com/XMLRPC
    
  • If the system connects to RHN via an http proxy, ensure that /etc/sysconfig/rhn/up2date is configured with the correct http_proxy information:

    httpProxy=http_proxy_fqdn or ip_address:port
    
  • If there is a duplicate file of /etc/sysconfig/rhn/up2date, remove it from /etc/sysconfig/rhn/

  • Ensure latest version of yum is installed:

# yum update yum
  • If all above settings are correct then clean the cache on client system using below command,

    # rm -rf /var/cache/yum/*
    

Root Cause

  • Inconsistent SSL configuration
  • Incorrect entries for http proxy and port number


  • Product(s)

  • Red Hat Satellite


  • Component

  • yum


  • Category

  • Troubleshoot


  • Tags

  • proxy
  • rhn
  • satellite
  • yum

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

NethServer Community

Loading

  • Ошибка cannot receive hello packet не прошивается смартфон сяоми
  • Ошибка cannot read property document of null
  • Ошибка cannot read property createobjectasync of undefined спутник
  • Ошибка cannot read property createobjectasync of undefined как исправить
  • Ошибка cannot read properties of undefined reading createobjectasync что это