[Bug 1766542] Re: Installation blocks when the machine is behind a proxy server
Julian Andres Klode
1766542 at bugs.launchpad.net
Thu Jun 28 14:37:04 UTC 2018
I had to tweak the time outs a bit, as I quickly get some errors from
the networking stack (like 7s or so), but I could successfully verify
the fix now, using a standard ubuntu:bionic lxd container, and modifying
the routes, and setting a lower timeout:
+ ip r del default
+ ip r add default via 10.33.102.254 dev eth0
+ ip -6 r del default
+ ip -6 r add default via fe80::689a:53ff:fe6f:8f85 dev eth0
RTNETLINK answers: File exists
+ cat
+ apt update -o acquire::http::timeout=1
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (113: No route to host) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (113: No route to host) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.162). - connect (113: No route to host) Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (113: No route to host) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
real 0m6.007s
user 0m0.139s
sys 0m0.026s
after 1.6.2:
lxc exec bb -- bash $PWD/rep4 apt -y install $PWD/Downloads/*_1.6.2_amd64.deb
+ ip r del default
+ ip r add default via 10.33.102.254 dev eth0
+ ip -6 r del default
+ ip -6 r add default via fe80::689a:53ff:fe6f:8f85 dev eth0
+ cat
+ apt -y install /home/jak/Downloads/apt_1.6.2_amd64.deb /home/jak/Downloads/libapt-pkg5.0_1.6.2_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'apt' instead of '/home/jak/Downloads/apt_1.6.2_amd64.deb'
Note, selecting 'libapt-pkg5.0' instead of '/home/jak/Downloads/libapt-pkg5.0_1.6.2_amd64.deb'
The following package was automatically installed and is no longer required:
libfreetype6
Use 'apt autoremove' to remove it.
Suggested packages:
apt-doc aptitude | synaptic | wajig dpkg-dev
The following packages will be REMOVED:
apt-utils ubuntu-minimal
The following packages will be upgraded:
apt libapt-pkg5.0
2 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/1966 kB of archives.
After this operation, 835 kB disk space will be freed.
Get:1 /home/jak/Downloads/libapt-pkg5.0_1.6.2_amd64.deb libapt-pkg5.0 amd64 1.6.2 [801 kB]
Get:2 /home/jak/Downloads/apt_1.6.2_amd64.deb apt amd64 1.6.2 [1166 kB]
(Reading database ... 28484 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.6.2_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.6.2) over (1.6.1) ...
Setting up libapt-pkg5.0:amd64 (1.6.2) ...
(Reading database ... 28484 files and directories currently installed.)
Removing ubuntu-minimal (1.417) ...
Removing apt-utils (1.6.1) ...
(Reading database ... 28443 files and directories currently installed.)
Preparing to unpack .../Downloads/apt_1.6.2_amd64.deb ...
Unpacking apt (1.6.2) over (1.6.1) ...
Setting up apt (1.6.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
+ apt update -o acquire::http::timeout=1
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Unable to connect to archive.ubuntu.com:http:
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to archive.ubuntu.com:80 (91.189.88.161), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::21), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::11), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1560:8001::14), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.162), connection timed out Could not connect to archive.ubuntu.com:80 (2001:67c:1360:8001::17), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Unable to connect to archive.ubuntu.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
real 0m3.130s
user 0m0.105s
sys 0m0.023s
** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1766542
Title:
Installation blocks when the machine is behind a proxy server
Status in OEM Priority Project:
Confirmed
Status in apt package in Ubuntu:
Fix Released
Status in ubiquity package in Ubuntu:
Incomplete
Status in apt source package in Bionic:
Fix Committed
Status in ubiquity source package in Bionic:
New
Bug description:
[Impact]
APT takes a long time to notice when certain connections time out
[Test case]
* Change the default route to not route stuff successfully (wrong gateway,
for example)
* Make your sources.list look like this:
deb http://archive.ubuntu.com/ubuntu bionic main restricted
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
* Run apt update
You should see that it fails with a long verbose error message for the
first entry, with all possible IP addresses listed in it; while for
the second one it fails with just "Unable to connect to
archive.ubuntu.com:http:" as it recognizes it has been blacklisted.
[Regression potential]
APT will not attempt to retry the host given that it could not connect to it for previous entries. If your network recovered in the meantime, it might update less than previously.
[Original bug report]
When the machine is behind a proxy server, the installation will block for a while (several minutes) to retrieve the package lists. The timeouts are too long and makes user feels the machine may have some problems.
The symptom is similar with bug #14599, but it seems the apt-setup
module was rewritten.
Another method to trigger this issue is to make the machine cannot
access to the Internet, for instance: a wrong gateway.
Image: 16.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1766542/+subscriptions
More information about the foundations-bugs
mailing list