Hi,
I tried to setup Local Yum Repository in my Environment. I installed nginx for http on the Server. Client can communicate to server and curl «http://xxx»
shows the repo folders but when I try to do «yum repolist» on the client I see this error.
Client:
[root@Server3 ~]# cat /etc/yum.repos.d/local-repos.repo
[local-base]
name=CentOS Base
baseurl=http://192.168.101.10/base/
gpgcheck=0
enabled=1
[local-centosplus]
name=CentOS CentOSPlus
baseurl=http://192.168.101.10/centosplus/
gpgcheck=0
enabled=1
[local-extras]
name=CentOS Extras
baseurl=http://192.168.101.10/extras/
gpgcheck=0
enabled=1
[local-updates]
name=CentOS Updates
baseurl=http://192.168.101.10/updates/
gpgcheck=0
enabled=1
[root@Server3 ~]#
[root@Server3 ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
http://192.168.101.10/base/repodata/repomd.xml: [Errno 14] HTTP Error 404 — Not Found
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.
http://192.168.101.10/base/repodata/repomd.xml: [Errno 14] HTTP Error 404 — Not Found
Trying other mirror.
http://192.168.101.10/centosplus/repodata/repomd.xml: [Errno 14] HTTP Error 403 — Forbidden
Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.
http://192.168.101.10/extras/repodata/repomd.xml: [Errno 14] HTTP Error 403 — Forbidden
Trying other mirror.
http://192.168.101.10/updates/repodata/repomd.xml: [Errno 14] HTTP Error 403 — Forbidden
Trying other mirror.
repo id repo name status
local-base CentOS Base 0
local-centosplus CentOS CentOSPlus 0
local-extras CentOS Extras 0
local-updates CentOS Updates 0
repolist: 0
=======================
[root@Server3 ~]# curl «http://192.168.101.10»
<html>
<head><title>Index of /</title></head>
<body bgcolor=»white»>
<h1>Index of /</h1><hr><pre><a href=»../»>../</a>
<a href=»base/»>base/</a> 29-May-2019 23:43 —
<a href=»centosplus/»>centosplus/</a> 29-May-2019 23:48 —
<a href=»extras/»>extras/</a> 29-May-2019 23:48 —
<a href=»updates/»>updates/</a> 29-May-2019 23:48 —
</pre><hr></body>
</html>
[root@Server3 ~]#
I see no repomd.xml files created when I created the repo.
Not Sure how to get around this. Please help
|
> fedora-chromium | 3.4 kB 00:00 .. so we grab a fresh repomd.xml > fedora-chromium/primary_db | 9.9 kB 00:00 .. primary metadata were there > fedora-chromium/filelists_db => 404 .. but not the filelist! Hmm, this suggests there's something wrong with mirrors themselves. I've already seen that few mirrors 404 on primary_db, right after frequent repomd.xml updates, but never all of them. > IOW, the signature prefix on that file shouldn't be offered until the mirrors are ready to serve it, right? When repo gets updated, repomd and MD files are very likely pushed independently, otherwise a single dead mirror would block the whole process. Filelists tend to be large so it may take a while. I'd suggest just try again in few minutes. Just to make sure there's no bug in yum, please run # egrep '(primary|filelists).sqlite' /var/cache/yum/fedora-chromium/repomd.xml # ls -l /var/cache/yum/fedora-chromium/*primary.sqlite and check that both the retrieved *primary.sqlite and the filelist that gave 404 have used the same repomd.xml.
I don't think the problem is with the chromium repo. The log says this at the end: Error: failure: repodata/6ad3ddc0b0eb5b314f41c263f9625a9528ed699d8159bebdec56203ab736ccfe-filelists.sqlite.bz2 from fedora-debuginfo: [Errno 256] No more mirrors to try. I haven't tried to update again since I generated the log, but here's the output you requested: [root@tlielax ~]# egrep '(primary|filelists).sqlite' /var/cache/yum/fedora-chromium/repomd.xml <location href="repodata/2edeb55260fe1e0fc9a00d6baf92bef74976f9393a82e7eb502c342a4bde2d38-primary.sqlite.bz2"/> <location href="repodata/cfdb36c3de1a5ca7d522db63bc2e12bc8c40025beb9cbe8079fca15222b85224-filelists.sqlite.bz2"/> [root@tlielax ~]# ls -l /var/cache/yum/fedora-chromium/*primary.sqlite -rw-r--r--. 1 root root 52224 Oct 10 09:12 /var/cache/yum/fedora-chromium/2edeb55260fe1e0fc9a00d6baf92bef74976f9393a82e7eb502c342a4bde2d38-primary.sqlite ...and here's the same for the fedora-debuginfo repo: # egrep '(primary|filelists).sqlite' /var/cache/yum/fedora-debuginfo/repomd.xml <location href="repodata/1e9f3fb809364d755fa4864aefebf1eaec9b10b0fd6dda330cbe6489075afce9-primary.sqlite.bz2"/> <location href="repodata/6ad3ddc0b0eb5b314f41c263f9625a9528ed699d8159bebdec56203ab736ccfe-filelists.sqlite.bz2"/> [root@tlielax ~]# ls -l /var/cache/yum/fedora-debuginfo/*primary.sqlite-rw-r--r--. 1 root root 9783296 May 21 21:49 /var/cache/yum/fedora-debuginfo/1e9f3fb809364d755fa4864aefebf1eaec9b10b0fd6dda330cbe6489075afce9-primary.sqlite ...I'll leave it to you to tell me whether this is correct or not. Maybe I'm just unlucky when I try to update my machine but this problem happens somewhat frequently, and it often takes quite a while for it to sort itself out (up to an hour in some cases). It really doesn't make any sense to me to ever present a half-baked repo. Wouldn't it be better to sync the data to an alternate spot and then rename the files into place once everything is there?
Right, fedora-chromium is ok. FAIL, didn't read logs properly :/ > repomd.xml: > <location href="repodata/1e9f3fb...-primary.sqlite.bz2"/> > <location href="repodata/6ad3ddc...-filelists.sqlite.bz2"/> > /var/cache/yum/fedora-debuginfo: > 1e9f3fb8...-primary.sqlite > failing url: > ftp://... 6ad3ddc0b0eb5b314f4 ... So the existing 'primary' file and the requested 'filelists' are referenced from the same repomd, that's what I wanted to check, thanks. Now things make more sense.. There's likely nothing wrong with mirrors- it's just yum using stale 'repomd.xml'. That should not happen right after 'yum clean all', maybe we've hit a bug there. I'm pretty sure that removing '/var/cache/yum/fedora-debuginfo/repomd.xml' and running yum again would fix this issue. Before you do that, could you please post 'ls -l' of that directory to see timestamps? Thanks!
Here you go. I've still not tried to update the machine, so let me know if you need more info. $ ls -l /var/cache/yum/fedora-debuginfo/ total 9584 -rw-r--r--. 1 root root 9783296 May 21 21:49 1e9f3fb809364d755fa4864aefebf1eaec9b10b0fd6dda330cbe6489075afce9-primary.sqlite -rw-r--r--. 1 root root 0 Nov 20 2010 395cf51348d27f5af6370e92908b5de9ac606390f589781007babc3c954658ec-filelists.sqlite.bz2 -rw-r--r--. 1 root root 0 Jun 14 15:40 6ad3ddc0b0eb5b314f41c263f9625a9528ed699d8159bebdec56203ab736ccfe-filelists.sqlite.bz2 -rw-r--r--. 1 root root 0 Oct 10 05:52 cachecookie -rw-r--r--. 1 root root 17320 Oct 10 05:52 metalink.xml drwxr-xr-x. 2 root root 4096 May 14 11:18 packages -rw-r--r--. 1 root root 3131 May 18 09:36 repomd.xml
5e6f5e16a... is the proper sha256sum for that repomd.xml file, and that is what all of the Fedora app servers are returning to that query, as far as I can tell. However, the ftp.nsysu.edu.tw mirror clearly has the wrong repomd.xml. Normally MirrorManager would recognize this and throw out the mirror. However, I can't find the nsysu.edu.tw mirror in the MirrorManager database anywhere. No URLs by that name, nothing obvious... So I'm not sure how you'd be getting directed there. Also note the URL pasted here points at development/15 which predates the release, and is in fact removed on the master mirrors. Oh look... i386/debug/repodata from ncsu is correct.
I don't see anything in the logs that mentions the nsysu.edu.tw URL so I'm not sure that I ever did go there. It's possible I fetched the file from there a while back, but that seems unlikely -- I'm using yum-fastestmirror and I'm on east coast of US -- nowhere near .tw... I'll hold off for a bit on updating the machine in case there's any other info under /var/cache/yum or that would interest you...
Thanks Jeff. That looks like a good metalink for the correct repomd.xml file. You're still getting failures? yum-fastestmirror could well have a bad cache itself - generally it isn't needed as much anymore because MM does a good job of handing out fast mirrors (statistically) preferred over slow mirrors.
Chatting with Jeff via IRC, he had incorrect data in /var/cache/yum/fedora-debuginfo/ (particularly the repomd.xml file, with timestamp newer than what was on the Fedora mirrors). yum clean all was not removing it. By manually removing that directory, yum was able to download the correct repomd.xml file from a mirror, and everything else started working as expected. Unclear why yum clean all doesn't just nuke /var/cache/yum/*, or at least nuke all the repomd.xml files previously downloaded. Also unclear why it wasn't downloading new repomd.xml files. In Jeff's cache: -rw-r--r--. 1 root root 3131 May 18 09:36 /var/cache/yum/fedora-debuginfo/repomd.xml On the mirrors: -rw-rw-r-- 1 ftp ftp 3132 May 17 13:33 repomd.xml Problem fixed for Jeff, so will close, but curious what the underlying failure really is.
Matt, thanks for help!
'yum clean' issue:
Repository 'fedora-debug' is disabled by default, but the 'auto-update-debuginfo' plugin enables it. 'yum clean all' cleans only enabled repositories and does not call 'prereposetup' hook, so the plugin does not run beforehand.
FIX: Make 'yum clean' call prereposetup hook (but not actual reposetup, since we don't want to download metadata just to remove it)?
'repomd.xml' timestamp:
When urlgrabber downloads a file, it's timestamp is set to whatever was in HTTP header. The 'cachecookie' file is used to check if metadata are current. This file is touched even if download/verification of new 'repomd.xml' fails and yum reverts to the old one. This should be changed too, probably.
Downloading an older repomd.xml file is fine (reget=None), but yum then calculates ts=max(timestamp) from <timestamp> tags in it, and refuses to use it if new_ts < old_ts. Maybe we should turn off that timestamp check, too?
if (self.timestamp_check and
old_repo_XML.timestamp > self.repoXML.timestamp):
logger.warning("Not using downloaded repomd.xml because it is "
"older than what we have:n"
" Current : %sn Downloaded: %s" %
Had the same issue. Thanks for the info. |
-
#1
FWIW. Do I just wait a day or two?
# /scripts/find_outdated_services
Looking for outdated services …
STDERR: failure: repodata/627303c2259cf5c803d72418b3050483451de14a87f79d956c2f059923c8a3ff-filelists.sqlite.bz2 from MariaDB106: [Errno 256] No more mirrors to try.
http://yum.mariadb.org/10.6/centos7…87f79d956c2f059923c8a3ff-filelists.sqlite.bz2: [Errno 14] HTTP Error 404 — Not Found
Cpanel::Exception::ProcessFailed::Error/(XID n52qh9) “/usr/local/cpanel/bin/needs-restarting-cpanel” reported error code “1” when it ended: failure: repodata/627303c2259cf5c803d72418b3050483451de14a87f79d956c2f059923c8a3ff-filelists.sqlite.bz2 from MariaDB106: [Errno 256] No more mirrors to try.
http://yum.mariadb.org/10.6/centos7…87f79d956c2f059923c8a3ff-filelists.sqlite.bz2: [Errno 14] HTTP Error 404 — Not Found
at /usr/local/cpanel/Cpanel/ChildErrorStringifier.pm line 161.
Cpanel::ChildErrorStringifier::to_exception(Cpanel::SafeRun::Object=HASH(0x2688c58)) called at /usr/local/cpanel/Cpanel/ChildErrorStringifier.pm line 140
Cpanel::ChildErrorStringifier::die_if_error(Cpanel::SafeRun::Object=HASH(0x2688c58)) called at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 680
Cpanel::SafeRun::Object::die_if_error(Cpanel::SafeRun::Object=HASH(0x2688c58)) called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 274
Cpanel::ProcessCheck::Outdated::_outdated_services_default() called at /usr/local/cpanel/Cpanel/ProcessCheck/Outdated.pm line 68
Cpanel::ProcessCheck::Outdated:utdated_services() called at /scripts/find_outdated_services line 83
scripts::find_outdated_services::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 96
eval {…} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
Try::Tiny::try(CODE(0x23c5348), Try::Tiny::Catch=REF(0x1ff6ca0)) called at /scripts/find_outdated_services line 92
scripts::find_outdated_services::run(scripts::find_outdated_services=HASH(0x1fc5b98)) called at /scripts/find_outdated_services line 72
Last edited by a moderator: Feb 10, 2022
10 Feb 2011
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:
http://nas1.itc.virginia.edu/fedora-epel/5/x86_64/repodata/bd1da...-primary.sqlite.bz2:
[Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: failure:
repodata/bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2 from
epel: [Errno 256] No more mirrors to try.
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.
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:
INFO:urlgrabber:attempt 1/10: http://mirrors.servercentral.net/fedora/epel/5/x86_64/repodata/repomd.xml
INFO:urlgrabber:creating new connection to mirrors.servercentral.net (405445232)
INFO:urlgrabber:STATUS: 200, OK
INFO:urlgrabber:success
Navigating to the ServerCentral EPEL mirror showed me the problem.
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:
<data type="primary_db">
<location href="repodata/bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76-primary.sqlite.bz2"/>
<checksum type="sha">bd1dac3a3d6ad62385741a9d50273ec1b2bcbd76</checksum>
<timestamp>1296232850</timestamp>
<size>3646557</size>
<open-size>15332352</open-size>
<open-checksum type="sha">b75a93c694f8cbfacca64e4d145a03595775f785</open-checksum>
<database_version>10</database_version>
</data>
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:
[main]
enabled=1
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
exclude=servercentral.net
Follow this up with a simple yum clean dbcache metadata and you’re golden!
Copyright © 2010 David Abdemoulaie. All rights reserved. Hosted by
GitHub and
powered by Jekyll.
I have the following error when trying to update yum for security can someone advise a fix, i have run yum clean metadata and that didnt work i am worried about running yum clean all as this was suggested as a fix in another post as i am not sure what it does?
sudo yum update
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
centos | 3.7 kB 00:00
http://apt.sw.be/redhat/el5/en/x86_64/dag/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel/x86_64/metalink | 23 kB 00:00
epel/x86_64 | 4.3 kB 00:00
epel/x86_64/updateinfo | 736 kB 00:00
epel/x86_64/primary_db | 5.9 MB 00:00
http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
rpmforge | 1.9 kB 00:00
4028 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package aws-cli.noarch 0:1.10.46-1.40.amzn1 will be updated
---> Package aws-cli.noarch 0:1.10.56-1.41.amzn1 will be an update
---> Package compat-libtiff3.x86_64 0:3.9.4-10.13.amzn1 will be updated
---> Package compat-libtiff3.x86_64 0:3.9.4-18.14.amzn1 will be an update
---> Package curl.x86_64 0:7.40.0-8.58.amzn1 will be updated
---> Package curl.x86_64 0:7.40.0-8.59.amzn1 will be an update
---> Package dracut.noarch 0:004-336.28.amzn1 will be updated
---> Package dracut.noarch 0:004-409.31.amzn1 will be an update
http://apt.sw.be/redhat/el5/en/x86_64/dag/repodata/filelists.sqlite.bz2: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Thanks
asked Aug 22, 2016 at 20:45
user1503606user1503606
3,71411 gold badges40 silver badges77 bronze badges
2
You should delete invalid repo file in /etc/yum.repos.d/ directory.
First detect repo file with:
# grep -l apt.sw.be /etc/yum.repos.d/
Delete invalid repo file and clean yum cache with:
# sudo yum clean all
answered Aug 23, 2016 at 11:11
2
Although AliOkan provided a valid answer, here is the reason why it fails in the first place, as I’ve hit the similar issue as well.
As from your trace (you actually had a ref to el5 btw, which is not maintained anymore):
http://apt.sw.be/redhat/el[5|6]/en/x86_64/dag/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
This error points to some issue with RPMForge repo, then on the official repo there’s this info:
RPMforge/RepoForge status
RPMForge/RepoForge is a dead project. It is not maintained. DO NOT
USE.See also https://github.com/repoforge/rpms/issues/375
It’s not officially maintained anymore, but if needed, there are mirrors in place, see git issue above.
answered Sep 5, 2016 at 8:31
fdufffduff
3,5912 gold badges30 silver badges39 bronze badges


