Incomplete .deb file download installing openjdk-21

Ubuntu Version:
Desktop 25.10

Problem Description:
Trying to install Open JDK 21 with:

sudo apt install openjdk-21-jdk

and it would try several times on openjdk-21-jdk-headless with messages like

Connection failed [IP: 91.189.91.81 80]

and eventually fail with

Error: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/o/openjdk-21/openjdk-21-jdk-headless_21.0.9%7e8ea-1_amd64.deb

But I can browse to that URL with a browser, and download the file manually. I was wondering if Comcast was interfering with the non-encrypted traffic, so I tried apt installing it while connected to my phone’s hotspot and it worked fine.

Other packages don’t have this problem, so I tried downloading the file with wget, and it gets to 99% and stalls.

Is this an issue with the Ubuntu web server, or is there something weird going on on my end?

I think your destination URL is down. I tried unsuccessfully to ping it.

[code] mtr 91.189.81.80
hugh@h270m:~$ ping -c5 91.189.81.80
PING 91.189.81.80 (91.189.81.80) 56(84) bytes of data.

— 91.189.81.80 ping statistics —
5 packets transmitted, 0 received, 100% packet loss, time 4079ms[/code]
Maybe you should consider another server from which to download the desired package.

To add to the post by @him610, sometimes the repositories have intermittent connection problems that can take a few hours to resolve.

1 Like

You typed the IP address incorrectly. That last 80 is a port in the error message.

Did you try again now?

I pinged it successfully.

Other packages work fine and I can browse the repository with a web browser. It’s not a connectivity issue (unless the cause is Comcast manipulating traffic).

I’ve reproduced the problem with curl as well as wget. The download only seems to stall on that particular package, always near the end, though it did succeed once.

I figured it out. Any sequence of 121 or more bytes of the ASCII letter ‘J’ breaks whatever surreptitious packet filtering Comcast is doing, and it silently black-holes the download.

Though it will succeed sometimes with that many, as if repeated downloads reset the state machine or something, but anything more than 123 seems to always fail. Sequences slightly less than 121 also succeed, but cause the download to pause for a moment.

The package http://us.archive.ubuntu.com/ubuntu/pool/main/o/openjdk-21/openjdk-21-jdk-headless_21.0.9%7e8ea-1_amd64.deb triggers it because a long ‘J’ sequence starts at the 82470499th byte.

I’m not kidding, this is real.

(Or, possibly, it’s an even weirder bug in Apache, or my router has been compromised and there’s a bug in the installed malware’s packet filtering.)

1 Like

That is utterly bizarre! Thanks for sharing.

I hope that you manage to figure out a solution. I was able to download it without problem, but I’m not with Comcast.

Can you try again while connected to your phone’s hotspot, so your computer is using a different provider? That should help to narrow it down a bit.