Bug#684407: apt: connection to Debian mirror with both A and AAAA records fails if client has no routable IPv6 address
Hi,
On Thursday 09 August 2012 11:55:01 Martin-Éric Racine wrote:
> Package: apt
> Version: 0.9.7.2
> Severity: important
> Tags: ipv6
>
> Failed to fetch
> http://http.debian.net/debian/pool/main/libf/libfile-libmagic-perl/libfi
> le-libmagic-perl_0.96-3_i386.deb Cannot initiate the connection to
> ftp.fi.debian.org:80 (2001:708:310:54::99). - connect (101: Network is
> unreachable) [IP: 2001:708:310:54::99 80]
Can you reproduce it? (e.g. by attempting to connect to ftp.fi.debian.org?)
And whenever it happens, could you please take note of the date and time,
and try to connect from another host? (say just do a GET on alioth to see if
it replies.)
http.debian.net continuously checks the mirrors for availability, but it's
possible that you were redirected to that mirror before it was found not to
be available some time later.
> This client host only has ::1 and fe80:: addresses since my ISP is not
> IPv6-enabled. However, apparently, the resolver returns both A and AAAA
> records for ftp.fi.debian.org and APT somehow tries to connect via the
> IPv6 address even though we don't have any IPv6 route to the outside
> world.
Whenever a host resolves to multiple addresses, APT tries to connect to all
of them, one by one, before giving up and displaying the error message of
the last attempt.
So, it seems APT was unable to connect to ftp.fi.debian.org's IPv4 address
due to an unknown reason, then tried the v6 address and failed, righly so.
As for the APT side, perhaps the full errors stack should be returned from
the acquire methods?
A new option that sets an AF_INET or AF_INET6 hint for getaddrinfo could
also be added, but that's mostly a workaround IMO.
Kind regards,
--
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
Reply to: