Failed to fetch openjdk-11-jre_11.0.5+10-0ubuntu1.1~18.04_amd64.deb

Asked by Ralf Spengler on 2020-02-04

Hello,

since Friday, 31.01.2020, I observe the following problem and maybe someone of you has an idea what could be the reason for this problem (or tell me that this is a bug I should report):

Platform:
--------------
Ubuntu 18.04 (inside Azure DevOps build pipelines):

Description:
-------------------
When calling

sudo apt-get install -y default-jre

the command fails with the following message (full trace see at the end of this report):

Failed to fetch https://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre_11.0.5+10-0ubuntu1.1~18.04_amd64.deb 404 Not Found [IP: 52.138.202.111 80]

I'm confident that this is not a general problem of Ubuntu and its package dependencies itself because using the current 18.04 Docker-image of Ubuntu on a local machine, I cannot reproduce this error.

Additional things I think I've found out so far:

Before the error occurs, first the install command of openjdk-11-jre is "Ign"ored (see full trace at the end), than default-jre is installed from https://azure.archive.ubuntu.com/ubuntu bionic-update.
https://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/ does not contain a package of version 11.0.5 for Ubuntu 18.04.

I would be glad if you would take a look at that. Thanks. :-)

The full trace of the apt-get install command:
--------------------------------------------------------------------
2020-02-03T08:47:59.9515744Z Reading package lists...
2020-02-03T08:48:00.7411135Z Building dependency tree...
2020-02-03T08:48:00.7870541Z Reading state information...
2020-02-03T08:48:00.9568614Z The following packages were automatically installed and are no longer required:
2020-02-03T08:48:00.9570234Z bc dns-root-data dnsmasq-base ebtables grub-pc-bin landscape-common
2020-02-03T08:48:00.9572660Z libdumbnet1 liblxc-common liblxc1 libuv1 linux-headers-4.15.0-72 lxcfs lxd
2020-02-03T08:48:00.9573336Z lxd-client python3-attr python3-automat python3-click python3-colorama
2020-02-03T08:48:00.9573914Z python3-constantly python3-hyperlink python3-incremental python3-pam
2020-02-03T08:48:00.9574530Z python3-pyasn1 python3-pyasn1-modules python3-service-identity
2020-02-03T08:48:00.9576042Z python3-twisted python3-twisted-bin python3-zope.interface uidmap xdelta3
2020-02-03T08:48:00.9576606Z Use 'sudo apt autoremove' to remove them.
2020-02-03T08:48:00.9577462Z The following additional packages will be installed:
2020-02-03T08:48:00.9578003Z fonts-dejavu-extra libatk-wrapper-java libatk-wrapper-java-jni
2020-02-03T08:48:00.9578904Z openjdk-11-jre
2020-02-03T08:48:01.0595633Z The following NEW packages will be installed:
2020-02-03T08:48:01.0598452Z default-jre fonts-dejavu-extra libatk-wrapper-java libatk-wrapper-java-jni
2020-02-03T08:48:01.0599750Z openjdk-11-jre
2020-02-03T08:48:01.3808887Z 0 upgraded, 5 newly installed, 0 to remove and 19 not upgraded.
2020-02-03T08:48:01.3809986Z Need to get 2051 kB of archives.
2020-02-03T08:48:01.3810212Z After this operation, 7678 kB of additional disk space will be used.
2020-02-03T08:48:01.3811395Z Ign:1 https://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openjdk-11-jre amd64 11.0.5+10-0ubuntu1.1~18.04
2020-02-03T08:48:01.3895594Z Get:2 https://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 default-jre amd64 2:1.11-68ubuntu1~18.04.1 [1076 B]
2020-02-03T08:48:01.3896655Z Get:3 https://azure.archive.ubuntu.com/ubuntu bionic/main amd64 fonts-dejavu-extra all 2.37-1 [1953 kB]
2020-02-03T08:48:01.4141991Z Get:4 https://azure.archive.ubuntu.com/ubuntu bionic/main amd64 libatk-wrapper-java all 0.33.3-20ubuntu0.1 [34.7 kB]
2020-02-03T08:48:01.4150622Z Get:5 https://azure.archive.ubuntu.com/ubuntu bionic/main amd64 libatk-wrapper-java-jni amd64 0.33.3-20ubuntu0.1 [28.3 kB]
2020-02-03T08:48:01.4233905Z Err:1 https://security.ubuntu.com/ubuntu bionic-updates/main amd64 openjdk-11-jre amd64 11.0.5+10-0ubuntu1.1~18.04
2020-02-03T08:48:01.4234336Z 404 Not Found [IP: 52.138.202.111 80]
2020-02-03T08:48:01.4463430Z Fetched 2017 kB in 0s (5713 kB/s)
2020-02-03T08:48:01.4464338Z E: Failed to fetch https://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre_11.0.5+10-0ubuntu1.1~18.04_amd64.deb 404 Not Found [IP: 52.138.202.111 80]
2020-02-03T08:48:01.4464712Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openjdk-lts Edit question
Assignee:
No assignee Edit question
Solved by:
Ralf Spengler
Solved:
2020-02-05
Last query:
2020-02-05
Last reply:
2020-02-04

Do you have rules configured in iptables? Do they allow the traffic out to security.ubuntu.com ?

security.ubuntu.com uses http, not https

Manfred Hampl (m-hampl) said : #2

I see two causes:

1. some of the Ubuntu (Launchpad) repositories do not allow https, but only http access (change your sources.list configuration file!)

and

2. there is already a new package version 11.0.6+10-1ubuntu1~18.04.1 and the old one has been deleted (run sudo apt-get update!)

Manfred Hampl (m-hampl) said : #3

I just spotted another inconsistency in your output, probably caused by unexpected entries your sources.list

Err:1 https://security.ubuntu.com/ubuntu bionic-updates/main

bionic-updates should be taken from the "normal" repository (in you case azure.archive.ubuntu.com)
and the bucket name for the link pointing to security.ubuntu.com should only be bionic-security

Ralf Spengler (raspe) said : #4

Hello,

thanks for the fast replies.

Regarding your suggestions

1. iptables is not the problem as far as I can see. Routing issues have been one of the first things I checked after I read the "404 Not Found" message. I checked accessibility of http://security.ubuntu.com/ubuntu/pool/main/o/openjdk-lts/ using wget.

2. I'll check out whether I can change the configuration of Azures default Ubuntu-image to access security.ubuntu.com by http and provide feedback to you. I haven't been aware that this URL is only reachable by https. In case this solves the problem I will give feedback to you and report it as error to Microsoft.

3. apt-get update: I didn't try such a simple thing yet (my mistake because I assumed until now that the pipeline-images provided in Azure DevOps are kept updated). I'll try that and provide feedback to you. in case this solves the problem I'll report an error to Microsoft that they should include that in the build process for their default pipeline image.

4. I'll check whether I can take a look inside the sources.list of the pipeline-image within Azure and provide feedback to you. If I can solve the problem by performing the changes suggested by Manfred Hampl, I'll give feedback and report it as an error to Microsoft.

4.

Ralf Spengler (raspe) said : #5

Thanks again for your help.

Solution:
Manfred Hampl was right. The image used by Azure DevOps is (against what its documentation states) not kept up-to-date by Microsoft. A simple

"apt-get update"

solves it (I really was too dump to think at such a simple thing in that context).

I've reported that to Microsoft at https://developercommunity.visualstudio.com/content/problem/907292/microsoft-hosted-agent-ubuntu-1804-is-not-up-to-da.html
in the hope they don't close that uninvestigated again. (That's what they did when I reported them the problem solved by you the first time because I was very sure it was a mistake made at there side.)

Other remarks:
- sources.list looks fine at the first glance. I'm afraid Microsoft is doing additional strange things in the background causing the https connection to security.ubuntu.com instead of a simple http.

Best regards and thank you very much for your support.