Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to azure.archive.ubuntu.com flaky failure on ubuntu-* strikes back #6894

Closed
3 of 10 tasks
traversaro opened this issue Jan 10, 2023 · 9 comments
Closed
3 of 10 tasks

Comments

@traversaro
Copy link

Description

On some jobs (apparently in a non-deterministic way) commands such as apt-get install or apt-get upgrade fail with the following error:

Need to get 77.1 MB of archives.
After this operation, 304 MB of additional disk space will be used.
Err:1 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libhyphen0 amd64 2.8.8-7
  503  Service Unavailable [IP: 20.106.104.242 80]
Get:2 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5positioning5 amd64 5.12.8+dfsg-0ubuntu1 [197 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5sensors5 amd64 5.12.8-0ubuntu1 [114 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5webchannel5 amd64 5.12.8-0ubuntu1 [51.2 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libwoff1 amd64 1.0.2-1build2 [42.0 kB]
Get:6 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5webkit5 amd64 5.212.0~alpha4-1ubuntu2.1 [12.1 MB]
Get:7 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libavahi-core7 amd64 0.7-4ubuntu7.1 [82.0 kB]
Get:8 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libdaemon0 amd64 0.14-7 [13.9 kB]
Get:9 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 avahi-daemon amd64 0.7-4ubuntu7.1 [61.0 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 tk8.6-blt2.5 amd64 2.5.3+dfsg-4 [572 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 blt amd64 2.5.3+dfsg-4 [4944 B]
Get:12 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 fonts-lyx all 2.3.4.2-2 [154 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libavahi-glib1 amd64 0.7-4ubuntu7.1 [7792 B]
Get:14 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 geoclue-2.0 amd64 2.5.6-0ubuntu1 [91.9 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 iio-sensor-proxy amd64 2.8-1ubuntu2 [35.8 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libimagequant0 amd64 2.12.2-1.1 [31.4 kB]
Get:17 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libjs-jquery-ui all 1.12.1+dfsg-5 [232 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libnl-genl-3-200 amd64 3.4.0-1 [11.1 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libnss-mdns amd64 0.14.1-1ubuntu1 [22.9 kB]
Get:20 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 libpcsclite1 amd64 1.8.26-3 [22.0 kB]
Get:21 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5designer5 amd64 5.12.8-0ubuntu1 [2778 kB]
Get:22 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5help5 amd64 5.12.8-0ubuntu1 [134 kB]
Get:23 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5positioningquick5 amd64 5.12.8+dfsg-0ubuntu1 [24.7 kB]
Get:24 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5location5 amd64 5.12.8+dfsg-0ubuntu1 [628 kB]
Get:25 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5multimedia5-plugins amd64 5.12.8-0ubuntu1 [197 kB]
Get:26 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5webengine-data all 5.12.8+dfsg-0ubuntu1.1 [5627 kB]
Get:27 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libwebpdemux2 amd64 0.6.1-2ubuntu0.20.04.1 [9576 B]
Get:28 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5webenginecore5 amd64 5.12.8+dfsg-0ubuntu1.1 [32.2 MB]
Get:29 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5webengine5 amd64 5.12.8+dfsg-0ubuntu1.1 [171 kB]
Get:30 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libqt5webenginewidgets5 amd64 5.12.8+dfsg-0ubuntu1.1 [132 kB]
Get:31 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5websockets5 amd64 5.12.8-0ubuntu1 [63.4 kB]
Get:32 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 libqt5xmlpatterns5 amd64 5.12.8-0ubuntu1 [959 kB]
Get:33 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 pybind11-dev all 2.4.3-2build2 [119 kB]
Get:34 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 ttf-bitstream-vera all 1.10-8 [352 kB]
Get:35 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python-matplotlib-data all 3.1.2-1ubuntu4 [3788 kB]
Get:36 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-backcall all 0.1.0-2 [11.2 kB]
Get:37 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-cycler all 0.10.0-3 [8132 B]
Get:38 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-dateutil all 2.7.3-3ubuntu1 [63.3 kB]
Get:39 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-decorator all 4.4.2-0ubuntu1 [10.3 kB]
Get:40 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-numpy amd64 1:1.17.4-5ubuntu3.1 [2724 kB]
Get:41 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-mpi4py amd64 3.0.3-4build2 [500 kB]
Get:42 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-h5py amd64 2.10.0-2build2 [873 kB]
Get:43 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-parso all 0.5.2-1ubuntu1 [62.8 kB]
Get:44 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-jedi all 0.15.2-1 [502 kB]
Get:45 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pickleshare all 0.7.5-2 [7560 B]
Get:46 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-wcwidth all 0.1.8+dfsg1-3 [17.4 kB]
Get:47 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-prompt-toolkit all 2.0.10-2 [220 kB]
Get:48 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-ipython-genutils all 0.2.0-1ubuntu1 [21.1 kB]
Get:49 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-traitlets all 4.3.3-3 [59.9 kB]
Get:50 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-ipython all 7.13.0-1 [494 kB]
Get:51 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-kiwisolver amd64 1.0.1-3build1 [61.3 kB]
Get:52 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-pyparsing all 2.4.6-1 [61.3 kB]
Get:53 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-matplotlib amd64 3.1.2-1ubuntu4 [4459 kB]
Get:54 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-olefile all 0.46-2 [33.7 kB]
Get:55 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 python3-pbr all 5.4.5-0ubuntu1 [64.0 kB]
Get:56 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-pil amd64 7.0.0-4ubuntu0.7 [366 kB]
Get:57 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pybind11 all 2.4.3-2build2 [5556 B]
Get:58 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-sip amd64 4.19.21+dfsg-1build1 [87.9 kB]
Get:59 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5 amd64 5.14.1+dfsg-3build1 [2318 kB]
Get:60 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtmultimedia amd64 5.14.1+dfsg-3build1 [141 kB]
Get:61 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtopengl amd64 5.14.1+dfsg-3build1 [99.7 kB]
Get:62 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtpositioning amd64 5.14.1+dfsg-3build1 [138 kB]
Get:63 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtquick amd64 5.14.1+dfsg-3build1 [321 kB]
Get:64 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtsql amd64 5.14.1+dfsg-3build1 [87.5 kB]
Get:65 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtsvg amd64 5.14.1+dfsg-3build1 [26.9 kB]
Get:66 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtwebchannel amd64 5.14.1+dfsg-3build1 [14.1 kB]
Get:67 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtwebengine amd64 5.14.0-2build1 [122 kB]
Get:68 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtwebkit amd64 5.14.1+dfsg-3build1 [103 kB]
Get:69 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtwebsockets amd64 5.14.1+dfsg-3build1 [23.8 kB]
Get:70 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pyqt5.qtxmlpatterns amd64 5.14.1+dfsg-3build1 [40.9 kB]
Get:71 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-mock all 3.0.5-1build1 [25.6 kB]
Get:72 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-qtpy all 1.9.0-3 [28.5 kB]
Get:73 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-tk amd64 3.8.10-0ubuntu1~20.04 [104 kB]
Get:74 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-tornado amd64 6.0.3+really5.1.1-3 [304 kB]
Get:75 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-u-msgpack all 2.1-1build1 [7576 B]
Get:76 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 python3-zmq amd64 18.1.1-3 [294 kB]
Get:77 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 wpasupplicant amd64 2:2.9-1ubuntu4.3 [1183 kB]
Fetched 77.1 MB in 8s (9594 kB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/h/hyphen/libhyphen0_2.8.8-7_amd64.deb  503  Service Unavailable [IP: 20.106.104.242 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 123.

This is similar to the previous solved issue #675

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Examples:

Is it regression?

Yes. However, it is not easy to determine the latest sane version as it is a non-deterministic bug.

Expected behavior

apt-get install should complete successfully.

Actual behavior

apt-get install fails.

Repro steps

Run any action that runs sudo apt install several times.

@douglas-raillard-arm
Copy link

We are also experiencing failed jobs such as this one:
https://github.com/ARM-software/lisa/actions/runs/3884968922/jobs/6628229248

@DioEgizio
Copy link

can confirm, these issues are happening very frequently in the last days

@hloeung
Copy link

hloeung commented Jan 11, 2023

You probably want apt-get retry --option="APT::Acquire::Retries=3" or similar as a workaround.

@mikhailkoliada
Copy link
Contributor

Hello! There is nothing we can do about it from our side, these are the network issues on azure mirror out of our control.

nijel added a commit to WeblateOrg/weblate that referenced this issue Jan 11, 2023
kou added a commit to groonga/groonga that referenced this issue Jan 12, 2023
This is a workaround for a "503 Service Unavailable" error when
executing the apt command.

For #1480.

See also: actions/runner-images#6894

Co-authored-by: Sutou Kouhei <[email protected]>
dlech added a commit to dlech/micropython that referenced this issue Jan 13, 2023
This could help with CI failures due to server connection problems.

Suggested-by: actions/runner-images#6894 (comment)
Signed-off-by: David Lechner <[email protected]>
@traversaro
Copy link
Author

traversaro commented Jan 13, 2023

Hello! There is nothing we can do about it from our side, these are the network issues on azure mirror out of our control.

Thanks for the reply @mikhailkoliada ! Back in 2020 (#675 (comment)) I think the GitHub Actions staff got in contact with Azure Apt mirrors teams to try to understand how to fix or at least mitigate this issue. Do you happen to know any contact/entry-point/issue tracker of the Azure Apt mirrors teams to report this problems?

I definitely do not know enough about this and the possible implication at GitHub Actions scale, but if this problem is persisten could it make sense to switch to some other apt mirrors?

@traversaro
Copy link
Author

Another idea I just had: as setting APT::Acquire::Retries=3 seems to help at least mitigate the problem, could it make sense to set it at the image level by adding a file in /etc/apt/apt.conf.d (see https://wiki.debian.org/AptConfiguration#apt.conf)?

nijel added a commit to nijel/translate that referenced this issue Jan 13, 2023
This seems to help with flaky azure mirror used in GitHub CI.

See actions/runner-images#675
and actions/runner-images#6894
nijel added a commit to translate/translate that referenced this issue Jan 13, 2023
This seems to help with flaky azure mirror used in GitHub CI.

See actions/runner-images#675
and actions/runner-images#6894
@nijel
Copy link

nijel commented Jan 13, 2023

Setting retries seems to be working in most cases. As this issue re-appears, it might be reasonable to include it in the CI images to avoid everybody adding some workaround in the actions. Besides that, I assume there is a good reason for sticking with Azure mirror when it's so flaky.

@douglas-raillard-arm
Copy link

douglas-raillard-arm commented Jan 13, 2023

So I tried with APT::Acquire::Retries=3 in /etc/apt/apt.conf.d and it did not fix anything. I'm pretty sure the conf is actually applied as I had a syntax error initially that prevented apt to run. I updated it to retry 20 times and so far all the jobs I've been running failed with something like that:

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/main/e/edk2/ovmf_0~20191122.bd85bf54-2ubuntu3.3_all.deb  Unable to connect to azure.archive.ubuntu.com:http: [IP: 20.106.104.242 80]

https://github.com/ARM-software/lisa/actions/runs/3910931347/jobs/6683709991

At this point, I'm tempted to overwrite /etc/apt/sources.list with the official content, is there any reason I should not do that ?

EDIT: this still fails with:

Err:1 http://archive.ubuntu.com/ubuntu focal/main amd64 dctrl-tools amd64 2.24-3
  Connection failed [IP: 40.81.13.82 80]

EDIT2: Looks like the official mirrors get redirected by Github infra to their own azure mirrors. apt is trying to fetch from archive.ubuntu.com and the complains about being unable to connect to azure. archive.ubuntu.com

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/e/edk2/ovmf_0~20191122.bd85bf54-2ubuntu3.3_all.deb  Unable to connect to azure.archive.ubuntu.com:http: [IP: 52.147.219.192 80]

https://github.com/ARM-software/lisa/actions/runs/3911002422/jobs/6683867161

@hloeung
Copy link

hloeung commented Jan 13, 2023

@mdrakiburrahman explains it best here - #675 (comment)

APT::Acquire::Retries=3 did not appear to fix it this time but would be useful for the future.

jchaffraix-slack added a commit to jchaffraix-slack/hhvm that referenced this issue May 15, 2023
The CI is failing due to some flaky connection to the
Ubuntu repository:

> E: Failed to fetch <package>  Connection failed [IP: <IP>]

This has happened for other projects and the recommendation
is to do retry those fetches:
actions/runner-images#6894
facebook-github-bot pushed a commit to facebook/hhvm that referenced this issue May 15, 2023
Summary:
The CI is failing due to some flaky connection to the Ubuntu repository:

> E: Failed to fetch &lt;package&gt;  Connection failed [IP: &lt;IP&gt;]

This has happened for other projects and the recommendation is to do retry those fetches:
actions/runner-images#6894

Pull Request resolved: #9366

Test Plan: The CI appears to be making it passed downloading with this change: https://github.com/facebook/hhvm/pull/9366/checks

Reviewed By: Wilfred

Differential Revision: D45871141

Pulled By: paulbiss

fbshipit-source-id: 6b4aab816efb1b6f8a685f3ad8968ddee1fce525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants