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-latest #675

Closed
2 of 5 tasks
traversaro opened this issue Apr 4, 2020 · 79 comments
Closed
2 of 5 tasks
Assignees
Labels
bug Something isn't working needs eyes OS: Ubuntu

Comments

@traversaro
Copy link

traversaro commented Apr 4, 2020

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

Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 gdb amd64 8.2-0ubuntu1~18.04 [3024 kB]
Get:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 gdbserver amd64 8.2-0ubuntu1~18.04 [292 kB]
Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libxml2-dev amd64 2.9.10+dfsg-2+ubuntu18.04.1+deb.sury.org+1 [821 kB]
Get:4 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libxml2 amd64 2.9.10+dfsg-2+ubuntu18.04.1+deb.sury.org+1 [726 kB]
Get:5 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libgraphicsmagick-q16-3 amd64 1.3.30+hg15796-1+ubuntu18.04.1+deb.sury.org+2 [1181 kB]
Get:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 libgraphicsmagick++-q16-12 amd64 1.3.30+hg15796-1+ubuntu18.04.1+deb.sury.org+2 [144 kB]
Err:7 http://azure.archive.ubuntu.com/ubuntu bionic/main amd64 libdouble-conversion1 amd64 2.0.1-4ubuntu1
  Could not connect to azure.archive.ubuntu.com:80 (52.177.174.250), connection timed out
Ign:8 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libqt5core5a amd64 5.9.5+dfsg-0ubuntu2.5
Ign:9 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libwayland-server0 amd64 1.16.0-1ubuntu1.1~18.04.3
Err:10 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgbm1 amd64 19.2.8-0ubuntu0~18.04.3
  Unable to connect to azure.archive.ubuntu.com:http:
Err:11 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb-xfixes0 amd64 1.13-2~ubuntu18.04
  Unable to connect to azure.archive.ubuntu.com:http:
Err:12 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libegl-mesa0 amd64 19.2.8-0ubuntu0~18.04.3
  Unable to connect to azure.archive.ubuntu.com:http:
Err:13 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libegl1 amd64 1.0.0-2ubuntu2.3

For an example of such failure, check https://github.com/robotology/idyntree/pull/668/checks?check_run_id=560084383 . I would not be too surprised about CI jobs failing for networks problems, but this specific issue seems to be extremely frequent. I did not collect precise data on how much frequently this happens, but my impression that it happens in the order of magnitude of 1 out of 10 builds.

This issue is already being discussed on GitHub Community Forum at https://github.community/t5/GitHub-Actions/Install-dependencies-in-Ubuntu-flakes-several-times-a-wekk/td-p/51785 , but the GitHub support suggested me to open an issue here as well.

Area for Triage:

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
I would expect commands such as apt-get install to work correctly.

Actual behavior
It is not clear what is triggering this behavior, but sometimes apt-get install fails.

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Apr 5, 2020

I added -o Acquire::Retries=3, and today it worked, then failed for a while, then starting working again.

It may not be a GitHub issue, but they (and especially MSFT) have the resources to mirror azure.archive.ubuntu.com so Actions CI is reliable...

@boegel
Copy link

boegel commented Apr 6, 2020

We've been seeing issues like this fairly frequently since Sunday March 29th...

@boegel
Copy link

boegel commented Apr 6, 2020

Using -o Acquire::Retries=3 is not helping for us, see for example https://github.com/easybuilders/easybuild-easyblocks/pull/2012/checks?check_run_id=563883264

@MCOfficer
Copy link

I mentioned this on the github community post, but you can probably use apt-spy2 to find a working mirror before using apt.

@MSP-Greg
Copy link
Contributor

MSP-Greg commented Apr 6, 2020

@boegel

Sorry, I didn't mean to imply that using -o Acquire::Retries=3 was a fix. What I meant was that if one is using it and apt-get still times out, there is really a problem.

@boegel
Copy link

boegel commented Apr 7, 2020

I mentioned this on the github community post, but you can probably use apt-spy2 to find a working mirror before using apt.

That adds a couple of minutes to each run, but it seems to work well to circumvent the problems, thanks a lot!

For other, see for example easybuilders/easybuild-easyconfigs#10341

@znarf
Copy link

znarf commented Apr 7, 2020

On our side, we get 503 errors on almost all runs past few hours:

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/f/fonts-arphic-bkai00mp/fonts-arphic-bkai00mp_2.10-17_all.deb  503  Service Unavailable [IP: 52.177.174.250 80]

@deivid-rodriguez
Copy link

I added this to my workflow before apt-get install as a workaround:

sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update

nijel added a commit to WeblateOrg/weblate that referenced this issue Apr 7, 2020
JasonGross added a commit to JasonGross/fiat-crypto that referenced this issue Apr 7, 2020
@Betree
Copy link

Betree commented Feb 6, 2023

We used a different approach to work around this issue:

steps:
  - name: Hack sources.list
    run: sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/sources.list
  - ...

You can pick any mirror from https://launchpad.net/ubuntu/+archivemirrors, ideally one in the US since Github Actions servers are in the US.

@ddelange
Copy link

ddelange commented Feb 6, 2023

hard-coding a specific mirror will most likely overload their server if too many people pick it. poor universities 😅

@Spenhouet
Copy link

Adding apt-spy2 did not do the trick for me.

The following packages have unmet dependencies:
 libegl-mesa0 : Depends: libgbm1 (= 22.0.5-0ubuntu0.1) but 22.0.5-0ubuntu0.3 is to be installed
                Depends: libglapi-mesa (= 22.0.5-0ubuntu0.1) but 22.0.5-0ubuntu0.3 is to be installed
E: Unable to correct problems, you have held broken packages.
Failed to install browsers
Error: Installation process exited with code: 100

@ddelange
Copy link

ddelange commented Feb 6, 2023

switching to launchpad (my snippet above) fixed that one for us ^

D-Simona-G added a commit to SmdhMdep/ckanext-saml2auth that referenced this issue Feb 6, 2023
* Update plugin.py

* Update setup-ckan.bash

* Update setup-ckan.bash

* Temp workaround

actions/runner-images#675

* Update setup-ckan.bash

* Update setup-ckan.bash

* Update setup-ckan.bash

* Update setup-ckan.bash

* Update setup-ckan.bash

* Update test.ini
@ClaudiaKolesnikova
Copy link

Adding apt-spy2 did not do the trick for me.

The following packages have unmet dependencies:
 libegl-mesa0 : Depends: libgbm1 (= 22.0.5-0ubuntu0.1) but 22.0.5-0ubuntu0.3 is to be installed
                Depends: libglapi-mesa (= 22.0.5-0ubuntu0.1) but 22.0.5-0ubuntu0.3 is to be installed
E: Unable to correct problems, you have held broken packages.
Failed to install browsers
Error: Installation process exited with code: 100

hi, I have the same error, did you fix that?

@Spenhouet
Copy link

sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update

@ClaudiaKolesnikova Yes, I did this, suggested by @ddelange.

dlaehnemann added a commit to snakemake/snakemake that referenced this issue Feb 28, 2023
This should make this step stable against otherwise randomly recurring trouble with the azure mirror. The solution is given and explained here:
actions/runner-images#675 (comment)

Basically, this looks for the best mirror in US, where GitHub Actions seems to be hosted, and then updates to get the latest index from there.

Hopefully, this consistently avoids failures like this one in the future:
https://github.com/snakemake/snakemake/actions/runs/4291216092/jobs/7478626266#step:13:112

```
sudo apt install -y stress git wget openmpi-bin libopenmpi-dev mariadb-server
[...]
Err:1 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-common all 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:5 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 libmariadb3 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:6 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-core-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-client-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-core-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:14 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server-10.6 amd64 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Err:41 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 mariadb-server all 1:10.6.11-0ubuntu0.22.04.1
  404  Not Found [IP: 40.81.13.82 80]
Fetched 12.2 MB in 12s (985 kB/s)
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-common_10.6.11-0ubuntu0.22.04.1_all.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/libmariadb3_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-client-core-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-client-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server-core-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server-10.6_10.6.11-0ubuntu0.22.04.1_amd64.deb  404  Not Found [IP: 40.81.13.82 80]
E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/pool/universe/m/mariadb-10.6/mariadb-server_10.6.11-0ubuntu0.22.04.1_all.deb  404  Not Found [IP: 40.81.13.82 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Error: Process completed with exit code 100.
```
@aethernet
Copy link

Same issue for me, and simply running an apt-get update before installing anything fixed it.

mirenradia added a commit to GRTLCollaboration/GRTeclyn that referenced this issue Mar 9, 2023
Only update package repo mirrors as in
actions/runner-images#675 (comment)
if updating the database fails.
@hloeung
Copy link

hloeung commented Mar 9, 2023

Same issue for me, and simply running an apt-get update before installing anything fixed it.

Not an "issue", it's what you're meant to do.

When images used are built, they're bundled with a package index. Packages are constantly updated with various security fixes and such and thus indexes can be out-of-date. apt-get update is required to pull in the latest package indexes.

bors bot added a commit to intellij-rust/intellij-rust that referenced this issue Mar 9, 2023
10223: CI: fix failing of regression tests r=Undin a=neonaot

Thanks to `@ortem` for investigating

Solution from actions/runner-images#675 (comment)

Co-authored-by: Alina Lobanova <neonaot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs eyes OS: Ubuntu
Projects
None yet
Development

No branches or pull requests