Debian 8 apt-get upgrade fails with Failed to fetch … Connection failed

aptdebian

Debian 8 "Jessie". CLI-only home-use server.

"apt-get upgrade" always fails with "E: Failed to fetch … Connection failed …" errors.

"apt-get update" appears to always succeed.

Problem has been occurring for days. Upgrades were previously succeeding without issue. Recently re-sized the /home and /var drive partitions but cannot think of any other major changes.

Have attempted to include several mirrors in /etc/apt/sources.list but none succeed. My sources.list file is:

deb http://mirror.it.ubc.ca/debian jessie main
deb http://mirror.its.dal.ca/debian jessie main
deb http://debian.mirror.iweb.ca/debian jessie main
deb http://debian.mirror.rafal.ca/debian jessie main
deb http://ftp3.nrc.ca/debian jessie main

deb-src http://mirror.it.ubc.ca/debian jessie main
deb-src http://mirror.its.dal.ca/debian jessie main
deb-src http://debian.mirror.iweb.ca/debian jessie main
deb-src http://debian.mirror.rafal.ca/debian jessie main
deb-src http://ftp3.nrc.ca/debian jessie main

deb http://mirror.it.ubc.ca/debian jessie-updates main
deb http://mirror.its.dal.ca/debian jessie-updates main
deb http://debian.mirror.iweb.ca/debian jessie-updates main
deb http://debian.mirror.rafal.ca/debian jessie-updates main
deb http://ftp3.nrc.ca/debian jessie-updates main

deb-src http://mirror.it.ubc.ca/debian jessie-updates main
deb-src http://mirror.its.dal.ca/debian jessie-updates main
deb-src http://debian.mirror.iweb.ca/debian jessie-updates main
deb-src http://debian.mirror.rafal.ca/debian jessie-updates main
deb-src http://ftp3.nrc.ca/debian jessie-updates main

Example of errors encountered:

Err http://mirror.its.dal.ca/debian/ jessie/main base-files amd64 8+deb8u2
  Connection failed [IP: 192.75.96.254 80]

E: Failed to fetch http://ftp3.nrc.ca/debian/pool/main/b/base-files/base-files_8+deb8u2_amd64.deb  Connection failed [IP: 132.246.2.23 80]

No proxy is defined in /etc/apt/apt.conf or /etc/apt/apt.conf.d

Attempting to download the failed URLs on a different, desktop computer through a web browser also fail with connection errors.

Perhaps related, attempting to download netinstall images with a desktop web browser from cdimage.debian.org always fail with a "The connection was reset" error.

My Arch Linux desktop computer can upgrade packages fine.

Best Answer

Doing a reboot and retrying the upgrade process solved this problem for me.

sudo reboot 
Related Question