yum repomd.xml does not match metalink for epel - or other repository

Posted by Matt Bryson on 12-Sep-2014 10:50:46
Find me on:

We had this error the other day when running our vagrant script (centOS box):

[Errno -1] repomd.xml does not match metalink for epel
Trying other mirror.

This tried and failed on every single mirror, and basically hung our deployment.

After reading up on it a bit, apparently this occurs when the mirrors are syncing - not sure why that would cause an issue, but after about 4 hours (when they had synced) the error went away.

We did find a workaround though, delete the existing cached repo folder from the centOS box before running yum.

To do this simply on the box do..

"ssh on box"

sudo rm -rf /etc/yum.repos.d/epel.repo

Or as part of our ansible provisioning script...

"ansible provisioning playbook"

- name: Remove old epel repo from yum as this can cause conflicts with the mirrors
shell: sudo rm -rf /etc/yum.repos.d/epel.repo
ignore_errors: yes

- name: Install CentOS Dependencies.
yum: name={{item}} state=installed
- httpd - mysql ..................


Topics: Ansible, Deployment, yum, CentOS, Linux, Vagrant, Provisioning

About the author

Matt Bryson is an experienced systems engineer with over 15 years Development and Systems Operations experience.

NEW - Free eBook

Transforming your eDetail process. Click below to download the eBook.

New Call-to-action

Subscribe to Email Updates

Recent Posts