Yum cannot access mirrors but wget can

Issues related to software problems.
Post Reply
lklepner
Posts: 3
Joined: 2013/12/18 14:51:50

Yum cannot access mirrors but wget can

Post by lklepner » 2013/12/18 14:56:12

Hi,

I'm experiencing a problem with yum. All of the mirrors were experiencing an error
http://mirror.itc.virginia.edu/fedora-e ... repomd.xml
[Errno 4] IOError: <urlopen error (111, 'Connection refused')>

But if I curl that same URL it loads without a problem.

Is it possible I have a network config problem which only applies to yum?

Thanks,
Lou

lklepner
Posts: 3
Joined: 2013/12/18 14:51:50

Re: Yum cannot access mirrors but wget can

Post by lklepner » 2013/12/18 15:40:27

I ran yum clean all and now when I run yum update an error loading the mirrorlist -

# yum update
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5 ... 64&repo=os error was
[Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

Like before the mirrorlist is accessible by curl -
# curl "http://mirrorlist.centos.org/?release=5 ... 64&repo=os"
http://mirror.ash.fastserv.com/pub/linu ... os/x86_64/
http://mirror.cs.vt.edu/pub/CentOS/5.10/os/x86_64/
http://mirror.stanford.edu/yum/pub/cent ... os/x86_64/
http://mirror.lug.udel.edu/pub/centos/5.10/os/x86_64/
http://mirror.pac-12.org/5.10/os/x86_64/
http://mirror.atlanticmetro.net/centos/5.10/os/x86_64/
http://mirror.es.its.nyu.edu/centos/5.10/os/x86_64/
http://linux.mirrors.es.net/centos/5.10/os/x86_64/
http://mirrors.adams.net/centos/5.10/os/x86_64/
http://mirror.rackspace.com/CentOS/5.10/os/x86_64/

I have two network interfaces - eth0 is a public IP DMZ, eth1 is a LAN connection without routing to the internet.
Is it possible the curl is routing through eth0 but yum is mistakenly trying to route through the eth1 interface?

Checking my route it seems like eth0 is the gateway... but I'm not an expert on this level of things.
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxx.xxx.96 0.0.0.0 255.255.255.240 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 xxx.xxx.xxx.97 0.0.0.0 UG 0 0 0 eth0

Thanks,
Lou

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum cannot access mirrors but wget can

Post by TrevorH » 2013/12/18 15:49:27

Or more likely mirrorlist.centos.org resolves to more than one IP address so it fails when you hit one particular one of them.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lklepner
Posts: 3
Joined: 2013/12/18 14:51:50

Re: Yum cannot access mirrors but wget can

Post by lklepner » 2013/12/18 15:51:00

Is there someplace I can manually copy/paste the mirror list?

Found it-
/var/cache/yum/base/mirrorlist.txt

Now I'm getting connection refused on all of the mirrors in very fast succession -
# yum update
http://mirror.ash.fastserv.com/pub/linu ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.cs.vt.edu/pub/CentOS/5.10 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.stanford.edu/yum/pub/cent ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.lug.udel.edu/pub/centos/5 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.pac-12.org/5.10/os/x86_64 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.atlanticmetro.net/centos/ ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.es.its.nyu.edu/centos/5.1 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://linux.mirrors.es.net/centos/5.10 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirrors.adams.net/centos/5.10/os ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
http://mirror.rackspace.com/CentOS/5.10 ... repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

And again if I curl an individual mirror it seems to work -
# curl "http://mirror.ash.fastserv.com/pub/linu ... repomd.xml"
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo">
<data type="other">
<location href="repodata/other.xml.gz"/>
<checksum type="sha">d886eb93bd0b81ccd64d7a9624707cbcc00d86af</checksum>
<timestamp>1381776732</timestamp>
<open-checksum type="sha">d1311d338b9a3bb51bd9daf87b7f954df551a197</open-checksum>
</data>
<data type="filelists">
<location href="repodata/filelists.xml.gz"/>
<checksum type="sha">3a04e3a894ca50b9ace3206ecd8548d4fd59558a</checksum>
<timestamp>1381776732</timestamp>
<open-checksum type="sha">8c39e8415f11a2c49cd70f28467821255d04420d</open-checksum>
</data>
<data type="primary">
<location href="repodata/primary.xml.gz"/>
<checksum type="sha">c0950219aeee9c367d2d04503f5ca076046c286e</checksum>
<timestamp>1381776732</timestamp>
<open-checksum type="sha">d0e5c962e637f0143ec477c7469b3232911de036</open-checksum>
</data>
<data type="group">
<location href="repodata/comps.xml"/>
<checksum type="sha">3ee7d3a7a85c2395bba18b417663a881ec0f31ef</checksum>
<timestamp>1381776346</timestamp>
</data>
</repomd>

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Yum cannot access mirrors but wget can

Post by avij » 2013/12/20 02:03:02

Perhaps your yum has been configured to use a proxy and the proxy is not working?

grep -ri proxy /etc/yum.*

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Yum cannot access mirrors but wget can

Post by TrevorH » 2013/12/20 02:35:48

Or alternatively, it needs to use a proxy and isn't set up
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply