yum update - 14: PYCURL ERROR 7 - Failed to connect

General support questions
Post Reply
skilet
Posts: 6
Joined: 2010/07/13 15:12:38
Contact:

yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by skilet » 2019/04/26 14:09:05

Hi People

when i want use yum update i get next error:

Code: Select all

[root@]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Error: Cannot find a valid baseurl for repo: base
Here is yum.comf

Code: Select all

[root@wiki skilet]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named fi

Centos Release

Code: Select all

[root@wiki skilet]# cat /etc/centos-release
CentOS release 6.8 (Final)

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

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by TrevorH » 2019/04/26 14:48:06

That's telling you 2 things: first that your ipv6 networking is broken as it cannot reach mirrorlist.centos.org over it. Second, it's telling you that your ipv4 network is broken too since it tries that first, fails silently then moves on and tries to use ipv6 and gets the visible error that you see there.

So you need to fix your ipv4 network so that you can reach the internet. You should also fix your ipv6 connectivity as that is also broken at the moment.

Try using curl -4 "http://mirrorlist.centos.org/?release=6 ... nfra=stock" to retrieve the mirror list output. The quotes round the url are required and necessary. Use what that says to debug the real problem with your network now.
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

skilet
Posts: 6
Joined: 2010/07/13 15:12:38
Contact:

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by skilet » 2019/04/26 15:12:41

Thanks you for reply TrevorH

i don't see anything wrong with my network


Network Config

Code: Select all

[root@wiki network-scripts]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:XX:XX:XX:XX
          inet addr:XXX.99.XX.XX  Bcast:XXX.99.XX.XX  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13299 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1282 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:829886 (810.4 KiB)  TX bytes:130652 (127.5 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:22167 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5547477 (5.2 MiB)  TX bytes:5547477 (5.2 MiB)
Ping google

Code: Select all

[root@wiki network-scripts]# ping google.com.ar
PING google.com.ar (172.217.164.131) 56(84) bytes of data.
64 bytes from iad30s24-in-f3.1e100.net (172.217.164.131): icmp_seq=1 ttl=52 time=13.5 ms
64 bytes from iad30s24-in-f3.1e100.net (172.217.164.131): icmp_seq=2 ttl=52 time=13.5 ms

The VM (VPS) is on OVH network, i has static route and gateway.

The server (VPS) working fine in last 2 years

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

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by TrevorH » 2019/04/26 15:31:03

Run the curl command I posted before.
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

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

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by avij » 2019/04/26 15:37:00

For extra points, use -v:

Code: Select all

curl -4v "http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock"
This will show the reply headers as well, if you get that far with your request. Maybe you won't.

skilet
Posts: 6
Joined: 2010/07/13 15:12:38
Contact:

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by skilet » 2019/04/26 15:45:28

Hi, thanks for fast reply

Code: Select all

[root@wiki log]# curl -4v "http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock"
* About to connect() to mirrorlist.centos.org port 80 (#0)
*   Trying 216.176.179.218... Connection timed out
*   Trying 85.236.43.108... Connection timed out
*   Trying 212.69.166.138...
Ping TEST 1

Code: Select all

[root@wiki skilet]# ping 216.176.179.218
PING 216.176.179.218 (216.176.179.218) 56(84) bytes of data.
64 bytes from 216.176.179.218: icmp_seq=1 ttl=49 time=82.3 ms
64 bytes from 216.176.179.218: icmp_seq=2 ttl=49 time=82.3 ms
Ping TEST 2

Code: Select all

[root@wiki skilet]# ping 85.236.43.108
PING 85.236.43.108 (85.236.43.108) 56(84) bytes of data.
64 bytes from 85.236.43.108: icmp_seq=1 ttl=51 time=98.0 ms
64 bytes from 85.236.43.108: icmp_seq=2 ttl=51 time=98.3 ms
64 bytes from 85.236.43.108: icmp_seq=3 ttl=51 time=98.0 ms
^C
--- 85.236.43.108 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2566ms
Port 80 is open

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

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by TrevorH » 2019/04/26 15:53:29

I'd be pretty sure that you have a firewall problem. Someone has blocked port 80 which is why you can ping those ip addresses (which uses icmp) and yet you cannot connect over tcp port 80.

Talk to your network/security department, whichever one maintains the firewall.
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

skilet
Posts: 6
Joined: 2010/07/13 15:12:38
Contact:

Re: yum update - 14: PYCURL ERROR 7 - Failed to connect

Post by skilet » 2019/04/26 17:34:56

You Right the firewall is a problem.

Thank You

Post Reply