curl error connecting to update repos

I’m getting an error refreshing the update repos. This seems to have happened recently, I have successfully run updates previously (within the last couple of weeks).

$ sudo zypper lu -r repo-oss
Download (curl) error for 'http://download.opensuse.org/distribution/12.1/repo/oss/content':
Error code: Unrecognized error
Error message: Failed to connect to 2001:67c:2178:8::13: Network is unreachable

I assume the problem is that download.opensuse.org is resolving to an IPv6 address (yay IPv6). Unfortunately my ISP and freebie router don’t support IPv6 (boo), regardless network interface doesn’t have an IPv6 address (aside from the link local one).

Doing a bit of a tcpdump it looks like I’m getting both IPv4 and IPv6 addresses but obviously curl is choosing to use the IPv6 one by default.


17:56:01.420181 IP 192.168.1.66.34608 > dsldevice.lan.domain: 43078+ A? download.opensuse.org. (39)
17:56:01.421881 IP 192.168.1.66.40102 > dsldevice.lan.domain: 2345+ PTR? 254.1.168.192.in-addr.arpa. (44)
17:56:01.422109 IP 192.168.1.66.34608 > dsldevice.lan.domain: 59630+ AAAA? download.opensuse.org. (39)                                                                                      
17:56:01.428951 IP dsldevice.lan.domain > 192.168.1.66.40102: 2345* 1/0/0 PTR dsldevice.lan. (71)                                                                                           
17:56:01.430499 IP 192.168.1.66.51221 > dsldevice.lan.domain: 46570+ PTR? 66.1.168.192.in-addr.arpa. (43)                                                                                   
17:56:01.435678 IP dsldevice.lan.domain > 192.168.1.66.51221: 46570 NXDomain 0/0/0 (43)       
17:56:01.444031 IP dsldevice.lan.domain > 192.168.1.66.34608: 43078 1/0/0 A 195.135.221.134 (55)
17:56:01.448050 IP dsldevice.lan.domain > 192.168.1.66.34608: 59630 1/0/0 AAAA 2001:67c:2178:8::13 (67)

Any thoughts on why this is happening now and how I can work around it?

On 2012-04-26 08:26, cpackham wrote:

> Doing a bit of a tcpdump it looks like I’m getting both IPv4 and IPv6
> addresses but obviously curl is choosing to use the IPv6 one by default.

Yes, it is something stupid, it happens to many people.

> Any thoughts on why this is happening now and how I can work around it?

The typical solution is disabling IPv6 completely in the system. A neater
solution would be to disable it for curl only.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-04-26 08:26, cpackham wrote:
>
> I’m getting an error refreshing the update repos. This seems to have
> happened recently, I have successfully run updates previously (within
> the last couple of weeks).

A similar post in the mail list got this reply:

+++··············
Hi,

the host download.opensuse.org is effectively down currently.

That the IPv6 address is shown is basically a misfeatuer, please read it
as “download.opensuse.org unreachable: Connection timed out.”

Our admins are working on bringing up the host again.

Ciao, Marcus
··············+±

and a bit later:

+++··············
And it should be up again… (Just as I was writing above e-mail).

Ciao, Marcus
··············+±


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

OK so it looks like the IPv6 thing was a red-herring seems to be working for me now.