adoptium-support icon indicating copy to clipboard operation
adoptium-support copied to clipboard

JDK install on Ubuntu fails with HTTP 403

Open ppanyukov opened this issue 2 years ago • 46 comments

Please provide a brief summary of the bug

Something is wrong with SAS keys, maybe they expired?

Please provide steps to reproduce where possible

On Ubuntu 20.04, following instructions from here: https://blog.adoptium.net/2021/12/eclipse-temurin-linux-installers-available/

apt-get install -y wget apt-transport-https gnupg

wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -

echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list

apt-get update # update if you haven't already

apt-get install temurin-17-jdk

Expected Results

Obviously expecting the install to work :)

Actual Results

Result:

Err:28 https://packages.adoptium.net/artifactory/deb focal/main arm64 temurin-17-jdk arm64 17.0.4.0.0+8
  403  Forbidden [IP: 143.204.192.207 443]

E: Failed to fetch https://d3d227kvr2djy5.cloudfront.net/filestore/3e/3e51e8df20fe00a8b7f9e775a99594e20297b93e?response-content-type=application/x-debian-package&x-jf-traceId=960916e5c561db0a&X-Artifactory-repositoryKey=deb&X-Artifactory-projectKey=temurin&X-Artifactory-artifactPath=pool/main/t/temurin-17/temurin-17-jdk_17.0.4.0.0+8_arm64.deb&X-Artifactory-username=anonymous&Expires=1659354254&Signature=REDACTED

403  Forbidden [IP: 143.204.192.207 443]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

What Java Version are you using?

11

What is your operating system and platform?

Ubuntu 20.04: both x64 and ARM

How did you install Java?

No response

Did it work before?

Yes it did.

Did you test with other Java versions?

Yes, 11 and 17. Both broken. Both on ARM and x64.

On various machines too with different connectivity.

Relevant log output

No response

ppanyukov avatar Aug 01 '22 12:08 ppanyukov

@gdams is looking into this and is going to see if there is any problem on the JFrog side (JFrog host our installers)

sxa avatar Aug 01 '22 13:08 sxa

can confirm this issue on bionic arm64 as well on new installs as well as existing installs with this repo. seems to be the entire repo

theofficialgman avatar Aug 02 '22 00:08 theofficialgman

Is the version specified in the repo even deployed yet? The release of these versions is still open. Cloudfront+S3 usually sends 403 for nonexisting files too.

vladislav-orlovskiy avatar Aug 02 '22 07:08 vladislav-orlovskiy

do we have an ETA for fixing this. all our vmss builds are failing due to packer build dependencies: azure-arm: Err:6 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-8-jdk amd64 8.0.332.0.0+9-1 azure-arm: 403 Forbidden [IP: 99.84.178.22 443] azure-arm: Fetched 2290 kB in 1s (3927 kB/s) ==> azure-arm: E: Failed to fetch https://d3d227kvr2djy5.cloudfront.net/filestore/fb/fbffefb222179ebac0a9ce6c183a67544fdc79e7?response-content-type=application/x-debian-package&x-jf-traceId=8d346b60501a05ab&X-Artifactory-repositoryKey=deb&X-Artifactory-projectKey=temurin&X-Artifactory-artifactPath=pool/main/t/temurin-8/temurin-8-jdk_8.0.332.0.0+9-1_amd64.deb&X-Artifactory-username=anonymous&Expires=1659379922&Signature=XXX__&Key-Pair-Id=XXX 403 Forbidden [IP: 99.84.178.22 443] ==> azure-arm: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ==> azure-arm: cat: /usr/lib/jvm/temurin-8-jdk-amd64/release: No such file or directory

vn09917 avatar Aug 02 '22 08:08 vn09917

@vn09917 can you please try to perform an apt install with a bit lower version of the package and send us the output? I can't prove my guess rn cause my issue is related to an ansible role that uses the hardcoded latest version of the apt package.

vladislav-orlovskiy avatar Aug 02 '22 08:08 vladislav-orlovskiy

I believe this is fixed now. The issue was caused by us enabling the CDN on artificatory which doesn't seem to be working properly. For now, I've disabled the CDN and I'll raise a bug asking the jfrog team to look into why the CDN is giving us problems.

gdams avatar Aug 02 '22 08:08 gdams

@gdams Thank you so much!

vladislav-orlovskiy avatar Aug 02 '22 08:08 vladislav-orlovskiy

It seems that the issue still exists. I get following error:

#0 147.0 Err:16 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-8-jdk amd64 8.0.345.0.0+1-1
#0 147.0   403  Forbidden [IP: 10.24.80.18 8080]
#0 147.0 Fetched 170 MB in 2min 18s (1,232 kB/s)
#0 147.0 E: Failed to fetch https://jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com/aol-adoptium/filestore/64/64feb26d9d22c3cc5f531087b18fac828c2d28fe?X-Artifactory-username=anonymous&X-Artifactory-repositoryKey=deb&X-Artifactory-artifactPath=pool/main/t/temurin-8/temurin-8-jdk_8.0.345.0.0+1-1_amd64.deb&X-Artifactory-projectKey=temurin&x-jf-traceId=25547a525b426390&response-content-type=application/x-debian-package&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220826T071706Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIASG3IHPL6RZALTNGC/20220826/us-west-2/s3/aws4_request&X-Amz-Signature=6b1322ac0be7a247a291cb4facf538c5151029da5869710eefc5ea9475c006e4  403  Forbidden [IP: 10.24.80.18 8080]
#0 147.0 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Ercolino avatar Aug 26 '22 09:08 Ercolino

I have the same issue on a docker build on several clients and VMs. But we have also some clients / vms where the same docker build works.

` Get:15 http://deb.debian.org/debian buster/main amd64 libxtst6 amd64 2:1.2.3-1 [27.8 kB] Get:16 https://packages.adoptium.net/artifactory/deb buster/main amd64 temurin-11-jdk amd64 11.0.17.0.0+8 [167 MB] Err:17 https://packages.adoptium.net/artifactory/deb buster/main amd64 temurin-17-jdk amd64 17.0.5.0.0+8 403 Forbidden [IP: 52.92.197.113 443] Err:18 https://packages.adoptium.net/artifactory/deb buster/main amd64 temurin-8-jdk amd64 8.0.352.0.0+8-1 403 Forbidden [IP: 52.92.197.113 443] Fetched 172 MB in 4min 26s (646 kB/s) E: Failed to fetch https://jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com/aol-adoptium/filestore/09/097d73e62006a695c21cd374fb0c1119f13c07af?X-Artifactory-username=anonymous&X-Artifactory-repositoryKey=deb&X-Artifactory-artifactPath=pool/main/t/temurin-17/temurin-17-jdk_17.0.5.0.0+8_amd64.deb&X-Artifactory-projectKey=temurin&x-jf-traceId=773d524acd2d1fe5&response-content-type=application/x-debian-package&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221111T092354Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIASG3IHPL6RZALTNGC/20221111/us-west-2/s3/aws4_request&X-Amz-Signature=012d69c2d59706fa13acf7c9d1cb3a10bd8b9913f4ccb569eb92861d05b18339 403 Forbidden [IP: 52.92.197.113 443] E: Failed to fetch https://jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com/aol-adoptium/filestore/f8/f8e30de36e704eafa3fe4615c32200171e5a44ae?X-Artifactory-username=anonymous&X-Artifactory-repositoryKey=deb&X-Artifactory-artifactPath=pool/main/t/temurin-8/temurin-8-jdk_8.0.352.0.0+8-1_amd64.deb&X-Artifactory-projectKey=temurin&x-jf-traceId=f77e6638819329de&response-content-type=application/x-debian-package&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221111T092354Z&X-Amz-SignedHeaders=host&X-Amz-Expires=60&X-Amz-Credential=AKIASG3IHPL6RZALTNGC/20221111/us-west-2/s3/aws4_request&X-Amz-Signature=90fe933c199be8c014d97a980db03d097f85b8d1b7344278e5f28532f2bfe0de 403 Forbidden [IP: 52.92.197.113 443] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

`

It seems it depends where the clients are located. Can it be that there is an issue with jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com, and on the clients, where it works, the packages are delivered from other amazon locations ?

berndschatz avatar Nov 11 '22 09:11 berndschatz

This is still happening. Is there a fix?

rylectro avatar Sep 01 '23 14:09 rylectro

@rylectro we rolled out a fix (https://github.com/adoptium/adoptium-support/issues/632#issuecomment-1677128906) and @nathan818fr confirmed it was working for him! Can you provide a log showing the issue?

gdams avatar Sep 01 '23 14:09 gdams

I'm having this issue also.

The error when I run locally:

870.4 The following NEW packages will be installed:
870.4   temurin-17-jdk
872.0 0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded.
872.0 Need to get 165 MB of archives.
872.0 After this operation, 330 MB of additional disk space will be used.
872.0 Get:1 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-17-jdk amd64 17.0.8.1.0+1 [165 MB]
872.0 Err:1 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-17-jdk amd64 17.0.8.1.0+1
872.0   File has unexpected size (3029 != 165381640). Mirror sync in progress? [IP: 151.101.139.42 443]
872.0   Hashes of expected file:
872.0    - SHA256:1ad35c78e198a90d6eb4424f391d0d6472c98627af3b7330dfe19fc59e2a6344
872.0    - SHA1:e313bd7b30c0414a6817f43eb236fb53b50ce8d3 [weak]
872.0    - Filesize:165381640 [weak]
872.0 E: Failed to fetch https://packages.adoptium.net/artifactory/deb/pool/main/t/temurin-17/temurin-17-jdk_17.0.8.1.0%2b1_amd64.deb  File has unexpected size (3029 != 165381640). Mirror sync in progress? [IP: 151.101.139.42 443]
872.0    Hashes of expected file:
872.0     - SHA256:1ad35c78e198a90d6eb4424f391d0d6472c98627af3b7330dfe19fc59e2a6344
872.0     - SHA1:e313bd7b30c0414a6817f43eb236fb53b50ce8d3 [weak]
872.0     - Filesize:165381640 [weak]
872.0 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The error on my build agent:

#9 459.5 The following NEW packages will be installed:
#9 459.5   adoptium-ca-certificates fonts-dejavu fonts-dejavu-extra java-common p11-kit
#9 459.5   p11-kit-modules temurin-8-jdk
#9 459.6 0 upgraded, 7 newly installed, 0 to remove and 8 not upgraded.
#9 459.6 Need to get 87.1 MB of archives.
#9 459.6 After this operation, 214 MB of additional disk space will be used.
#9 459.6 Get:1 https://packages.adoptium.net/artifactory/deb jammy/main amd64 adoptium-ca-certificates all 1.0.2-1 [2304 B]
#9 459.6 Get:2 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-8-jdk amd64 8.0.382.0.0+5 [84.8 MB]
#9 459.8 Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 p11-kit-modules amd64 0.24.0-6build1 [223 kB]
#9 460.3 Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 p11-kit amd64 0.24.0-6build1 [101 kB]
#9 460.4 Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 fonts-dejavu-extra all 2.37-2build1 [2041 kB]
#9 460.9 Get:6 http://archive.ubuntu.com/ubuntu jammy/universe amd64 fonts-dejavu all 2.37-2build1 [3192 B]
#9 461.0 Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 java-common all 0.72build2 [6782 B]
#9 462.7 Ign:2 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-8-jdk amd64 8.0.382.0.0+5
#9 464.1 Err:2 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-8-jdk amd64 8.0.382.0.0+5
#9 464.1   Error reading from server. Remote end closed connection [IP: 151.101.139.42 443]
#9 464.1 Fetched 2377 kB in 5s (522 kB/s)
#9 464.1 E: Failed to fetch https://packages.adoptium.net/artifactory/deb/pool/main/t/temurin-8/temurin-8-jdk_8.0.382.0.0%2b5_amd64.deb  Error reading from server. Remote end closed connection [IP: 151.101.139.42 443]
#9 464.1 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Stiverton avatar Oct 02 '23 19:10 Stiverton

@Stiverton I've just tried it in an Ubuntu 20.04 docker container and it looks ok for me with both temurin-17-jdk and temurin-8-jdk

sxa avatar Oct 03 '23 09:10 sxa

I'm getting the same problem for Ubuntu 22.04 - while building packer image in AWS. Locally I can download the package manually without the issue.

While executing ping in AWS packages.adoptium.net resolves for me to 199.232.27.42 and locally to s.sni.global.fastly.net (151.101.3.42) what probably makes the difference.

maciej-poleszczyk avatar Oct 03 '23 14:10 maciej-poleszczyk

I'm getting the same problem for Ubuntu 22.04 - while building packer image in AWS. Locally I can download the package manually without the issue.

While executing ping in AWS packages.adoptium.net resolves for me to 199.232.27.42 and locally to s.sni.global.fastly.net (151.101.3.42) what probably makes the difference.

Please note that we made a change yesterday to wrap Fastly around the JFrog instance. You might be experiencing DNS cache issues here. Can you try clearing cache?

gdams avatar Oct 03 '23 14:10 gdams

Is there a rate limit that could be causing 403s?

Stiverton avatar Oct 03 '23 14:10 Stiverton

@Stiverton No 403 errors in your logs. The problems you're experiencing have nothing to do with this issue (which has been fixed). You're experiencing a different problem, so maybe you should create a new issue.

nathan818fr avatar Oct 03 '23 20:10 nathan818fr

$ ping packages.adoptium.net
PING s.sni.global.fastly.net (146.75.75.42) 56(84) bytes of data.
Err:5 https://packages.adoptium.net/artifactory/deb buster/main amd64 temurin-8-jdk amd64 8.0.382.0.0+5
   403  Forbidden [IP: 151.101.3.42 443]

kalpaitch avatar Oct 05 '23 14:10 kalpaitch

Same here, did work before without any problems.

#16 6.247 Err:3 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-11-jdk amd64 11.0.20.1.0+1 #16 6.247 Error reading from server. Remote end closed connection [IP: 151.101.131.42 443]

phiob avatar Oct 05 '23 19:10 phiob

@kalpaitch can you provide the full set of install commands that you're running?

gdams avatar Oct 09 '23 12:10 gdams

I have this problem a well. I'm trying to build a Docker container with Ubuntu 20 and Temurin 11:

apt-get install temurin-11-jdk
Err:2 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-11-jdk amd64 11.0.20.1.0+1
  403  Forbidden [IP: 199.232.19.42 443]

However, when I try the version before that, it works:

apt-get install temurin-11-jdk=11.0.20.0.0+8
Get:1 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-11-jdk amd64 11.0.20.0.0+8 [168 MB]
Fetched 168 MB in 5s (37.0 MB/s)

For now, this works for me, but at some point I would like to be able to just use the first call and get the latest version of Temurin...

malice00 avatar Oct 14 '23 18:10 malice00

I have this problem a well. I'm trying to build a Docker container with Ubuntu 20 and Temurin 11:

apt-get install temurin-11-jdk
Err:2 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-11-jdk amd64 11.0.20.1.0+1
  403  Forbidden [IP: 199.232.19.42 443]

However, when I try the version before that, it works:

apt-get install temurin-11-jdk=11.0.20.0.0+8
Get:1 https://packages.adoptium.net/artifactory/deb focal/main amd64 temurin-11-jdk amd64 11.0.20.0.0+8 [168 MB]
Fetched 168 MB in 5s (37.0 MB/s)

For now, this works for me, but at some point I would like to be able to just use the first call and get the latest version of Temurin...

Encounter the same issues.

BillyLiou avatar Oct 18 '23 08:10 BillyLiou

@BillyLiou can you please try updating ca-certificates before running the install?

gdams avatar Oct 18 '23 08:10 gdams

Hi @gdams , can you provide some methods? Because I am not familiar with this part.

Btw I use ubuntu 20.04.

Thanks.

BillyLiou avatar Oct 18 '23 08:10 BillyLiou

Sure! Just run this command first:

apt-get install ca-certificates

If you already have the package installed you should be able to simply run:

update-ca-certificates

gdams avatar Oct 18 '23 08:10 gdams

@BillyLiou did the above command fix your issue?

gdams avatar Oct 18 '23 21:10 gdams

Weird... I had decided to use one of your docker images instead, but I wanted to test mentioned workaround -- I can't reproduce the error anymore: installing either curl or wget to get the repository key, also installs/updates ca-certs after which everything works as expected... Not sure what I did differently before...

malice00 avatar Oct 18 '23 22:10 malice00

Hi @gdams, it worked. But I will still observe it's stability.

Thanks.

BillyLiou avatar Oct 19 '23 06:10 BillyLiou

I still see the issue after updating my ca-certs on Ubuntu 22.04 with error 400:

Err:1 https://packages.adoptium.net/artifactory/deb jammy/main amd64 temurin-17-jdk amd64 17.0.9.0+9
  400  Bad Request [IP: 151.101.3.42 443]
E: Failed to fetch https://packages.adoptium.net/artifactory/deb/pool/main/t/temurin-${VERSION}/temurin-17-jdk_17.0.9.0%2b9_amd64.deb  400  Bad Request [IP: 151.101.3.42 443]

dustingrady avatar Oct 27 '23 21:10 dustingrady

Seeing the same thing. Following the URL (https://packages.adoptium.net/artifactory/deb/pool/main/t/temurin-17/temurin-17-jdk_17.0.9.0+9_amd64.deb) fails with a 501.

markwoon avatar Oct 27 '23 23:10 markwoon