0

I'm running Ubuntu 22.04 LTS on WSL2 and have been running into some kind of apt issue where with a working internet connection and confirmed nslookups I always generate a phantom Error: Timeout Was Reached. I say phantom because I've checked every conceivable log and cannot find anything hinting at what error or connection errors would be relevant. Logs I've checked,

  • journalctl
  • apt term and history logs
  • syslog
  • dmesg

I've also tried every apt clean, remove, autoremove command.

I've tried running update in a more verbose mode but there is still no indicator why apt update always finishes with a timeout despite being able to find other requested packages. I've tried editing sources.list with the vanilla sources.list for 22.04 and still timeout. I've tried enabling a single source at a time but they all hit a timeout at the end regardless of successful fetches.

I am at a complete loss what is causing this, please let me know if there's further logs I can share.

Here is an example of the output of sudo apt update:

Hit:1 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://archive.canonical.com/ubuntu jammy InRelease
Hit:5 https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu jammy InRelease
Error: Timeout was reached
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Here is an example of that end of output I receive from sudo apt -oDebug::pkgAcquire::Worker=1 update

0% [Waiting for headers] <- http:102%20Status%0aMessage:%20Waiting%20for%20headers%0aURI:%20http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease
 <- gpgv:201%20URI%20Done%0aGPGVOutput:%20GOODSIG%20871920D1991BC93C%0aSigned-By:%20F6ECB3762474EDA9D21B7022871920D1991BC93C!%0aFilename:%20/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_jammy_InRelease%0aURI:%20gpgv:/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_jammy_InRelease
 -> gpgv:600%20URI%20Acquire%0aURI:%20gpgv:/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-security_InRelease%0aFilename:%20/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-security_InRelease%0aTarget-Type:%20index%0aTarget-Release:%20jammy-security%0aTarget-Repo-URI:%20http://archive.ubuntu.com/ubuntu/%0aTarget-Base-URI:%20http://archive.ubuntu.com/ubuntu/dists/jammy-security/%0aTarget-Site:%20http://archive.ubuntu.com/ubuntu%0aIndex-File:%20true%0aMaximum-Size:%2010000000%0aLast-Modified:%20Tue,%2030%20Jan%202024%2006:38:28%20GMT%0aFail-Ignore:%20true%0a%0a
0% [Waiting for headers] [Waiting for headers] <- gpgv:201%20URI%20Done%0aGPGVOutput:%20GOODSIG%20871920D1991BC93C%0aSigned-By:%20F6ECB3762474EDA9D21B7022871920D1991BC93C!%0aFilename:%20/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-security_InRelease%0aURI:%20gpgv:/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-security_InRelease
0% [Waiting for headers] [Waiting for headers] <- http:201%20URI%20Done%0aIMS-Hit:%20true%0aLast-Modified:%20Fri,%2019%20Jan%202024%2017:47:17%20+0000%0aFilename:%20/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease%0aURI:%20http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease
 -> gpgv:600%20URI%20Acquire%0aURI:%20gpgv:/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease%0aFilename:%20/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease%0aTarget-Type:%20index%0aTarget-Release:%20jammy-backports%0aTarget-Repo-URI:%20http://archive.ubuntu.com/ubuntu/%0aTarget-Base-URI:%20http://archive.ubuntu.com/ubuntu/dists/jammy-backports/%0aTarget-Site:%20http://archive.ubuntu.com/ubuntu%0aIndex-File:%20true%0aMaximum-Size:%2010000000%0aLast-Modified:%20Fri,%2019%20Jan%202024%2017:47:17%20GMT%0aFail-Ignore:%20true%0a%0a
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
0% [Waiting for headers] <- gpgv:201%20URI%20Done%0aGPGVOutput:%20GOODSIG%20871920D1991BC93C%0aSigned-By:%20F6ECB3762474EDA9D21B7022871920D1991BC93C!%0aFilename:%20/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease%0aURI:%20gpgv:/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_jammy-backports_InRelease
0% [Waiting for headers] <- https:201%20URI%20Done%0aIMS-Hit:%20true%0aLast-Modified:%20Mon,%2023%20May%202022%2016:49:11%20+0000%0aFilename:%20/var/lib/apt/lists/partial/ppa.launchpadcontent.net_rael-gc_rvm_ubuntu_dists_jammy_InRelease%0aURI:%20https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu/dists/jammy/InRelease
 -> gpgv:600%20URI%20Acquire%0aURI:%20gpgv:/var/lib/apt/lists/ppa.launchpadcontent.net_rael-gc_rvm_ubuntu_dists_jammy_InRelease%0aFilename:%20/var/lib/apt/lists/ppa.launchpadcontent.net_rael-gc_rvm_ubuntu_dists_jammy_InRelease%0aTarget-Type:%20index%0aTarget-Release:%20jammy%0aTarget-Repo-URI:%20https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu/%0aTarget-Base-URI:%20https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu/dists/jammy/%0aTarget-Site:%20https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu%0aIndex-File:%20true%0aMaximum-Size:%2010000000%0aLast-Modified:%20Mon,%2023%20May%202022%2016:49:11%20GMT%0aFail-Ignore:%20true%0a%0a
Hit:5 https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu jammy InRelease
0% [Working] <- gpgv:201%20URI%20Done%0aGPGVOutput:%20GOODSIG%208094BB14F4E3FBBE%0aSigned-By:%207BE3E5681146FD4F1A40EDA28094BB14F4E3FBBE!%0aFilename:%20/var/lib/apt/lists/ppa.launchpadcontent.net_rael-gc_rvm_ubuntu_dists_jammy_InRelease%0aURI:%20gpgv:/var/lib/apt/lists/ppa.launchpadcontent.net_rael-gc_rvm_ubuntu_dists_jammy_InReleaseError: Timeout was reached
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them

UPDATE: Reset sources.list to just use archive.ubuntu.com

sources.list:

deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse

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

deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse

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

deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu/ jammy partner

deb-src http://archive.canonical.com/ubuntu/ jammy partner

result:

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Error: Timeout was reached
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Without evidence, if I had to guess, I'd say this all started with a botched a mysql uninstall a few weeks ago, not sure if that provides any helpful context.

  • You've provided no actual pastes of your messages for us to look for clues, such as issues with mirrors etc. Given you have access to your messages & what you're using, did you check launchpad for any known issues (we weren't provided messages so we can't). Have you also check for your own network issues if on a corporate/education or other controlled network? – guiverc Jan 30 '24 at 07:35
  • Hi guiverc, all of the logs are very lengthy and do not fit in the post's text input's char count, however I've opted to share truncated end of output of apt with debug options. If there is a better means to share long bulk logs on stack exchange please let me know and I will share those. I'm on my home network and switched the resolv.conf to nameserver 8.8.8.8 for posterity. Thank you. – jps_dot_dev Jan 30 '24 at 07:46
  • It is strange that you have 3 ubuntu.com and 1 canonical.com instead of 4 of one type. Please try resetting that with https://askubuntu.com/q/124017/1004020 – Daniel T Jan 30 '24 at 08:06
  • Try sudo apt clean then https://askubuntu.com/a/179976/1004020 – Daniel T Jan 30 '24 at 08:52
  • @DanielT same result unfortunately, for both the apt clean and deleting the /var/lib/apt/lists/ contents and running sudo apt-get update – jps_dot_dev Jan 30 '24 at 09:11

0 Answers0