Page 2 of 3

Re: Unable to use yum getting: 14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e9

Posted: 2013/05/31 19:26:35
by imageek72
Ok, i just fixed it somehow. The last change i made was to make the sysctl changes permanent and rebooted. Just to have it here in case anyone else needs it, here are all of the steps that i performed, i am not sure they are all needed.

service ip6tables off && chkconfig ip6tables off
edit /etc/sysconfig/network and remove anything to do with ipv6
edit /etc/sysconfig/network-scripts/ifcfg-em1 and remove anything to do with ipv6
edit /etc/sysctl.conf and add the following 2 lines:
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1

rebooted.

I had tried with just the sysctl -w net.ipv6.conf.default.disable_ipv6=1 and sysctl -w net.ipv6.conf.all.disable_ipv6=1 but it was not working and of course it was not sticking after a reboot. Once i made the changes in /etc/sysctl.conf and rebooted everything was working.

I am not a gambling man, but i would wager that this last part about making the changes permanent and then rebooting is the only step needed to resolve this issue.

Unable to use yum getting: 14: PYCURL ERROR 7 - "Failed to c

Posted: 2013/05/31 19:28:27
by gerald_clark
Try a 'yum clean all'.

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/01/24 23:52:06
by unixdoes
just to be clear, this is not OS specific, firewall related, or even yum per se.

it is a side effect of DNS...even if you recompile your kernel with 0 ipv6 at the lowest level, DNS responses can include v6 addrs, as 'mirrorlist.centos.org' now does.

this has broken many other apps as well, ntpd for example when many public clocks started including v6 addrs. even OS with no v6 in kernel would have ntpd die due to inability to connect.

so i guess long-term yum should add "-4/-6" type command line options much like ntpd and others have done.

just a thought

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/03/07 09:04:19
by prozit
FYI,

I have experienced this same problem. I was unable to solve it even while changing all settings mentioned in this thread.
The mistake I made was that I had just installed a new hardware firewall in the network and I did some misconfiguration which resulted in my CentOS server not being able to connect to the internet over HTTP and HTTPS using IPv4.
Since DNS is returning both IPv4 (first) and IPv6 records (secondly), I believe CentOS will first try to connect to the mirrors first using IPv4. If unable to, it will fallback to IPv6 and use IPv6 IP addresses to try to connect (since these are secondly requested). When you have not configured IPv6 (without killing IPv6 completely on the host by changing settings as mentioned in this thread), the host will return the warning PYCURL ERROR 7, since you are unable to connect to the mirrors using IPv6. If you completely disabled IPv6 by changing settings, you will receive an error that the connection just timed out without mentioning the IPv6 address.

For me, completely disabling IPv6 was possible by creating a new file in /etc/modprobe.d/ (I named it disableip6.conf) and adding the following lines in it:

alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1

After a reboot of my CentOS server, IPv6 was completely disabled and my server didn't request any AAAA records (IPv6) from DNS anymore.

I hope this info can help some of you out there!

Greets, Prozit!

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/03/07 10:24:12
by avij
prozit: To be clear, disabling IPv6 was not the fix. The fix was to fix your IPv4 routing. Disabling IPv6 only changed the error message.

If you don't want to use IPv6, do not disable loading the IPv6 module, as doing that can cause other problems. There is a better way to get rid of IPv6 if you need to. See the FAQ entry for details.

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/03/12 17:25:50
by ccie2020
I had the exactly same problem. I was too much focus on disabling ipv6. But it turned out the message itself has nothing to do with ipv6. In my case, it was
missing proxy setting in the /etc/yum.conf. As soon as I added "proxy=http://<ipv4addr>:3128" to yum.conf, everything started working.

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/10/13 14:59:14
by rugcutter
I ran into same error and discovered that, at my installation, a proxy specification is needed in yum.conf
proxy=http://yourproxy.yourcompany.com:8080
for example.

HTH

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/10/30 11:38:06
by bitozoid
This worked for me:

Code: Select all

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
(from http://www.businesscorner.co.uk/disable ... l-and-php/)

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/10/31 14:51:07
by dpop
Hi guys,

I see this thread is a bit old but in case someone gets here because is having the same issue I would like to help you resolve it. Problem is that the default IPv4 gateway is not set for some reason thus yum is trying to use IPv6 to reach out, which does not necessarily require a gateway. You can check if your IPv4 gateway is set by issuing the command netstat -nr. If you see only 0.0.0.0 under the Gateway column, well then you do not have a default gateway set. In order to resolve this, you should add GATEWAY=yourgateway into /etc/sysconfig/network and then issue service network restart command

Hope this helps someone

Re: Unable to use yum getting: 14: PYCURL ERROR 7 -

Posted: 2014/12/18 18:43:51
by Alup
I realize this is old however if you are using CentOS 6.6 on VirtalBox this issue happens.

If you are using VirtualBox then do the following to fix the issue.

shutdown the VM
Switch network adapter to NAT
run this command : VBoxManage modifyvm "VM name" --natdnshostresolver1 on
start the VM

yum update

That should fix your problem