Score:0

Error messages: openjdk-8 connection failed/timed out

hm flag

I am facing a challenge with this error, and I would greatly appreciate any assistance.

Everything runs smoothly when I execute sudo apt update, displaying the message "27 packages can be upgraded." However, issues arise when I proceed with sudo apt upgrade, as a few errors are encountered, as shown below:

want to continue? [Y/n] y
Ign:1 http:// kr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-8-jre-headless amd64 8u382-ga-1~22.04.1
Ign:1 http:// kr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-8-jre-headless amd64 8u382-ga-1~22.04.1
Ign:1 http:// kr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-8-jre-headless amd64 8u382-ga-1~22.04.1
Ign:1 http:// kr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-8-jre-headless amd64 8u382-ga-1~22.04.1
Err:1 http:// security.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-8-jre-headless amd64 8u382-ga-1~22.04.1 Connection failed [IP: 91.189.91.83 80]
E: Failed to fetch http:// security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u382-ga-1%7e22.04.1_amd64.deb Connection failed [IP: 91.189.91.83 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I attempted to resolve the issue by following the error message and running sudo apt update --fix-missing, but unfortunately, the error message remained unchanged.

I have listed all the methods I found online and attempted to debug the problem, but the error persists. If you have any additional suggestions or solutions, I would greatly appreciate your assistance in resolving this matter.


<Attempt 1>

"Failed to fetch security undetermined error ... | askUbuntu":

sudo nano /etc/apt/sources.list

I added the following lines to the file editor:

deb http:// archive.ubuntu.com/ubuntu focal main universe multiverse restricted
deb http:// security.ubuntu.com/ubuntu/ focal-security main multiverse universe restricted
deb http:// archive.ubuntu.com/ubuntu focal-updates main multiverse universe restricted

sudo apt clean && sudo apt autoclean
sudo apt update

There was no error on running these codes. However, I still received the same error when I attempted to run sudo apt upgrade.


<Attempt 2>

"apt-get update" always failed to fetch | askUbuntu":

sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo-get clean
sudo-get update
sudo-get upgrade

No errors occurred until sudo-get upgrade, and the error remained identical to the one mentioned earlier.


<Attempt 3>

"Install openjdk-8-jdk":

sudo apt update
sudo apt install openjdk-8-jdk-headless

When executing sudo apt install openjdk-8-jdk-headless, the same error as mentioned above occurred.


<Attempt 4>

"Could not get lock ...":

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*

sudo dpkg --configure -a
sudo apt update

<Attempt 5>

"Fail to install openjdk-8-jdk | Ubuntu":

sudo apt update
sudo apt clean
sudo apt -y full-upgrade
sudo apt -y install openjdk-8-jdk

sudo apt-get -f install

wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u312-b07-0ubuntu1~18.04_amd64.deb

Based on the information provided by ChatGPT, it is probable that the issue could be related to network stability. Nonetheless, my network functions smoothly, and I can install other packages without encountering any difficulties. Hence, I don't believe network stability is the reason for the problem. Additionally, I followed the suggestion to wait for a day, as it mentioned that server issues or network problems might be temporary and can sometimes resolve themselves after a few days.

As a newcomer to Linux, I am encountering difficulties dealing with these errors. If you have any additional suggestions or solutions, I would greatly appreciate your assistance in resolving this matter.

Score:0
hm flag

Simply change the server location to resolve this issue. While the default server location typically connects you to the nearest option, proximity doesn't guarantee reliability. Aim to locate a server that strikes a balance between quality and proximity. This adjustment should eliminate the errors.

Keep in mind that specific packages may necessitate particular server locations, so maybe try to mess around with it a bit.

To modify the server, navigate to Software Updater, then access Settings & Livepatch, and finally select Ubuntu Software. From there, adjust the "Download from" setting.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.