CentOS 6.8 Yum cannot connect?

General support questions
sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/19 01:52:13

Friends, Please help me with this.
Server at work needs to be patched and yum stopped working for some reason.

Network is ok, i can ping 8.8.8.8. DNS works ok, resolves the names. Stoping iptables didn't helped.
did yum clean all. spend all yesterday googling the solution and didn't find anything.
Hope someone can give me here an advice.

Code: Select all

# yum update

Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&inf...
14:PYCURL ERROR 56 - "Failure when receiving data from the peer"
Error: Cannot find a valid baseurl for repo: base


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

Re: CentOS 6.8 Yum cannot connect?

Post by TrevorH » 2017/08/19 02:10:03

That looks like some firewall is blocking connections outbound. If you ping something and get a reply, that doesn't mean you can access its other services. Are you behind a web proxy? Can you run curl "http://mirrorlist.centos.org/?release=6 ... 64&repo=os" and get a useful response?
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

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/19 02:31:13

There is no Proxy, just the gateway that NATs me to internet.
But curl didn't bring me a useful response. Does it mean that CentOS is ok and I need to look for the resolution in network?
Tried to disable local firewall but no use...

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

Re: CentOS 6.8 Yum cannot connect?

Post by avij » 2017/08/19 06:58:34

Please cut & paste the response that you got when you ran that curl command above.

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/20 21:04:04

avij wrote:Please cut & paste the response that you got when you ran that curl command above.
[root@NNNNNNN ~]# curl http://mirrorlist.centos.org/?release=6 ... 64&repo=os
[1] 21387
[2] 21388
[root@ NNNNNNN ~]# curl: (7) Failed to connect to 2001:4178:5:200::10: Network is unreachable

[root@ NNNNNNN ~]# curl http://mirrorlist.centos.org/
curl: (7) Failed to connect to 2604:1580:fe02:2::10: Network is unreachable

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/20 22:02:48

TrevorH wrote:That looks like some firewall is blocking connections outbound. If you ping something and get a reply, that doesn't mean you can access its other services. Are you behind a web proxy? Can you run curl "http://mirrorlist.centos.org/?release=6 ... 64&repo=os" and get a useful response?
couldn't curl anything on internet. above you can find the response.
does it mean that problem is outside of Centos?

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

Re: CentOS 6.8 Yum cannot connect?

Post by avij » 2017/08/21 09:04:43

If this one works

Code: Select all

ping -c 3 8.8.8.8
but this one does not

Code: Select all

curl -4 mirrorlist.centos.org
(should report back "Invalid release")

then it's likely that some firewall is blocking connections outbound. Please ask your network admin.

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/25 02:57:30

avij wrote:If this one works

Code: Select all

ping -c 3 8.8.8.8
but this one does not

Code: Select all

curl -4 mirrorlist.centos.org
(should report back "Invalid release")

then it's likely that some firewall is blocking connections outbound. Please ask your network admin.

Here is the command and output
curl -4 mirrorlist.centos.org
curl: (7) couldn't connect to host
Last edited by sancho85 on 2017/08/25 03:00:56, edited 1 time in total.

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/25 03:00:06

TrevorH wrote:That looks like some firewall is blocking connections outbound. If you ping something and get a reply, that doesn't mean you can access its other services. Are you behind a web proxy? Can you run curl "http://mirrorlist.centos.org/?release=6 ... 64&repo=os" and get a useful response?

Does this tell you anything?
Attachments
Yum2v.png
Yum2v.png (36.8 KiB) Viewed 25895 times

sancho85
Posts: 12
Joined: 2017/08/19 01:36:36

Re: CentOS 6.8 Yum cannot connect?

Post by sancho85 » 2017/08/25 03:26:59

in yum.conf I found this line:
proxy pointing to localhost. Can it be the reason?

also in Centos-Base.repo file baseurl is commented. Is it how it is supposed to be?


[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$ ... fra=$infra
#baseurl=http://mirror.centos.org/centos/$releas ... $basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Post Reply