View previous topic :: View next topic |
Author |
Message |
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1435 Location: Berlin, Germany
|
Posted: Wed May 31, 2023 8:02 am Post subject: connecting to distfiles.gentoo.org timing out |
|
|
I've been having a problem where the connection to a distfiles mirror is constantly timing out. Every file I try to download shows this in the emerge-fetch.log:
Code: | >>> Downloading 'http://distfiles.gentoo.org/distfiles/8b/python-ly-0.9.7.gh.tar.gz'
--2023-05-31 09:53:30-- http://distfiles.gentoo.org/distfiles/8b/python-ly-0.9.7.gh.tar.gz
Resolving distfiles.gentoo.org... 2a02:6ea0:c700::17, 2a02:6ea0:c700::18, 2a02:6ea0:c700::19, ...
Connecting to distfiles.gentoo.org|2a02:6ea0:c700::17|:80... failed: Connection timed out.
Connecting to distfiles.gentoo.org|2a02:6ea0:c700::18|:80... failed: Connection timed out.
Connecting to distfiles.gentoo.org|2a02:6ea0:c700::19|:80... failed: Connection timed out.
Connecting to distfiles.gentoo.org|2a02:6ea0:c700::10|:80... failed: Connection timed out.
Connecting to distfiles.gentoo.org|2a02:6ea0:c700::11|:80... failed: Connection timed out.
Connecting to distfiles.gentoo.org|195.181.170.19|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 239814 (234K) [application/x-gzip]
Saving to: ‘/var/portage/distfiles/python-ly-0.9.7.gh.tar.gz.__download__’
0K .......... .......... .......... .......... .......... 21% 295K 1s
50K .......... .......... .......... .......... .......... 42% 843K 0s
100K .......... .......... .......... .......... .......... 64% 440K 0s
150K .......... .......... .......... .......... .......... 85% 623K 0s
200K .......... .......... .......... .... 100% 535K=0.5s
2023-05-31 09:58:31 (481 KB/s) - ‘/var/portage/distfiles/python-ly-0.9.7.gh.tar.gz.__download__’ saved [239814/239814]
|
I'm connecting through a VPN, but that doesn't seem to be making a difference. Is there any way to debug this and figure out why the connection keeps failing?
Cheers,
EE |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21618
|
Posted: Wed May 31, 2023 1:50 pm Post subject: |
|
|
Based on the logs shown, you can resolve an IPv6 address for that host, but cannot connect to it over IPv6. Once you fall back to IPv4, connectivity works. Does IPv6 otherwise work in your network? |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1435 Location: Berlin, Germany
|
Posted: Wed May 31, 2023 2:58 pm Post subject: |
|
|
Ah, that is indeed the problem. My VPN blocks IPv6. So how do I prevent portage from making the IPv6 requests?
Cheers,
EE |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1657
|
Posted: Wed May 31, 2023 3:23 pm Post subject: |
|
|
ExecutorElassus wrote: | Ah, that is indeed the problem. My VPN blocks IPv6. So how do I prevent portage from making the IPv6 requests? |
Since this is system-wide, I would suggest editing /etc/gai.conf and setting the precedence values to prefer IPv4 over IPv6 like the comments in the file show.
All precedence values listed must be uncommented and the final one increased as noted in the example. (The final one being highest value.)
This method will apply to all DNS lookup calls via the system and could likely improve overall network performance on initial connections.
In addition, it is also possible to force IPv4 for portage downloads by doing FETCHCOMMAND="${FETCHCOMMAND} -4" and RESUMECOMMAND="${RESUMECOMMAND} -4" when using the standard wget. |
|
Back to top |
|
|
|