EPEL primary.sqlite.bz2 404 Not Found errors

I recently had an epic battle with yum and the EPEL repository. I wasted enough
time on it that I think it will be useful if others experience similar problems.

The Problem

I recently installed a new VM with [CentOS 5.5 x86_64]. Like usual I add the EPEL
and IUS Community repositories so that I can have access to git 1.7, PHP 5.3,
MySQL 5.1, and Python 2.6 among other things. Everything was fine for 2 days until
I went to install a package today. A simple yum install php53u-gd resulted in a
wall of 404 error messages when it tried to fetch some cryptic bzipped file:

I tried repeatedly to clean the yum metadata and cache, even yum clean all a few times. The problem persisted.

Troubleshooting

My first step was to actually look at one of the mirrors returning 404 and verify that the file
truly wasn’t there. Sure enough, it wasn’t. I also noted that they had recently been updated on 09-Feb-2011.

centos mirror repodata

I checked several other mirrors that were 404’ing and saw the same thing. Where was my machine fetching
this information from? I asked around on IRC (#epel on freenode) and “nirik” suggested I try
URLGRABBER_DEBUG=1 yum update which gave me the following output:

Navigating to the ServerCentral EPEL mirror showed me the problem.

servercentral repodata

The bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2 was not here either, but what really caught my
eye was that the repo hadn’t been updated since 27-Jan-2011.

YUM keeps a cache of the EPEL RPM database and assorted metadata in /var/cache/yum/epel.
Checking this location on my system showed that I had the bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2
file present. I also checked the contents of repomd.xml and found the root cause:

Aha! Not only was the mirror out of date, but the repomd.xml was out of sync with the mirror itself.

The Solution

CentOS is configured to use the fastestmirror yum plugin by default. My machine had an affinity for the
ServerCentral mirror because it was the fastest. To fix this I simply edit /etc/yum/pluginconf.d/fastestmirror.conf
adding an exclude as shown:

Follow this up with a simple yum clean dbcache metadata and you’re golden!

5 Responses to EPEL primary.sqlite.bz2 404 Not Found errors

  1. Benkim April 11, 2013 at 01:53 #

    Thankx! this helps bunch

  2. Robert B. August 21, 2013 at 17:25 #

    I ran into the same problem with spacewalk repository updates. I’m not sure I have the option of excluding a particular server with spacewalk. Anyone have any ideas? And when mirror sites become stale, how long does it take for them to get thrown out or updated?

    Thanks!

    • MaxMouse December 8, 2013 at 08:36 #

      Hi Robert, I had the same error on CentOS 6 when trying to install SpaceWalk as well. Just running “yum clean all” fixed it for me.

  3. MaD-MaX September 22, 2013 at 07:53 #

    Thanks Alot ! helped a lot

  4. Juan March 20, 2014 at 06:12 #

    Thanks!

Leave a Reply