I am encountering an interesting issue on a clean Ubuntu 20.04.3 LTS with apt-get. If I run e.g. sudo apt-get update
it gets stuck. I already force apt-get to use ipv4 and also clearing the cache does not help. Also using wget/curl on http://archive.ubuntu.com/ubuntu/dists/focal/InRelease seems to work fine.
Here the logs:
sudo apt-get update
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
...
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
0% [1 InRelease 768 B]
Her with HTTP debug logs enabled (sudo apt-get -o debug::acquire::http=yes update
):
0% [Working]GET http://archive.ubuntu.com/ubuntu/dists/focal/InRelease HTTP/1.1
Host: archive.ubuntu.com
Cache-Control: max-age=0
Accept: text/*
If-Modified-Since: Wed, 10 Nov 2021 19:43:04 GMT
User-Agent: Debian APT-HTTP/1.3 (2.0.6) non-interactive
0% [Waiting for headers]Answer for: http://archive.ubuntu.com/ubuntu/dists/focal/InRelease
HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: close
Content-Type: application/x-ns-proxy-autoconfig
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
0% [1 InRelease 768 B]GET http://archive.ubuntu.com/ubuntu/dists/focal/InRelease HTTP/1.1
Host: archive.ubuntu.com
Cache-Control: max-age=0
Accept: text/*
Range: bytes=768-
If-Range: Wed, 10 Nov 2021 20:11:07 GMT
User-Agent: Debian APT-HTTP/1.3 (2.0.6) non-interactive
0% [1 InRelease 768 B]Answer for: http://archive.ubuntu.com/ubuntu/dists/focal/InRelease
HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: close
Content-Type: application/x-ns-proxy-autoconfig
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
0% [1 InRelease 768 B]GET http://archive.ubuntu.com/ubuntu/dists/focal/InRelease HTTP/1.1
Host: archive.ubuntu.com
Cache-Control: max-age=0
Accept: text/*
Range: bytes=768-
If-Range: Wed, 10 Nov 2021 20:11:07 GMT
User-Agent: Debian APT-HTTP/1.3 (2.0.6) non-interactive
0% [1 InRelease 768 B]Answer for: http://archive.ubuntu.com/ubuntu/dists/focal/InRelease
HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: close
Content-Type: application/x-ns-proxy-autoconfig
...
And then this goes on basically forever