The spacewalk-repo-sync command fails with error 'yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository' after adding http proxy entries to /etc/rhn/rhn.conf

Solution Verified - Updated -

Issue

  • The spacewalk-repo-sync command fails with following error after adding http proxy entries to /etc/rhn/rhn.conf
[root@]# spacewalk-repo-sync --channel epel-5-x86_64 --type yum
Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 72, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-repo-sync", line 66, in main
    sync.main()
  File "/usr/share/rhn/satellite_tools/reposync.py", line 103, in main
    self.import_packages(plugin, url)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 135, in import_packages
    packages = plug.list_packages()
  File "/usr/share/rhn/satellite_tools/repo_plugins/yum_src.py", line 75, in list_packages
    sack.populate(repo, 'metadata', None, 0)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1226, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1399, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1395, in _getRepoXML
    raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: epel-5-x86_64. Please verify its path and try again
  • Another example of the problem:
# spacewalk-repo-sync --channel puppetlabs-products --url=http://yum.puppetlabs.com/el/6.4/products/x86_64/
Repo URL: http://yum.puppetlabs.com/el/6.4/products/x86_64/
ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: puppetlabs-products. Please verify its path and try again
Sync completed.
Total time: 0:00:00

Environment

  • Red Hat Network(RHN) Satellite 5.4, 5.5, 5.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content