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 InReleaseHit:2 http://archive.ubuntu.com/ubuntu jammy-security InReleaseHit:3 http://archive.ubuntu.com/ubuntu jammy-backports InReleaseHit:4 http://archive.canonical.com/ubuntu jammy InReleaseHit:5 https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu jammy InReleaseError: Timeout was reachedReading package lists... DoneBuilding dependency tree... DoneReading state information... Done2 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%0a0% [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_InRelease0% [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%0aHit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease0% [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_InRelease0% [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%0aHit:5 https://ppa.launchpadcontent.net/rael-gc/rvm/ubuntu jammy InRelease0% [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 reachedReading package lists... DoneBuilding dependency tree... DoneReading state information... Done2 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 multiversedeb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiversedeb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiversedeb 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 InReleaseHit:2 http://archive.ubuntu.com/ubuntu jammy-updates InReleaseHit:3 http://archive.ubuntu.com/ubuntu jammy-security InReleaseHit:4 http://archive.ubuntu.com/ubuntu jammy-backports InReleaseError: Timeout was reachedReading package lists... DoneBuilding dependency tree... DoneReading state information... Done2 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.