Apt-get is unable to hit any servers - Wily

Asked by Steven Saunders

Apt-get times out, ignoring most servers. It worked last week, no changes made.

Running through Troubleshooting...

ubuntu-support-status
Support status summary of 'SaundersLab':

You have 2738 packages (100.0%) that can not/no-longer be downloaded
You have 0 packages (0.0%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details

cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory

 dpkg --print-foreign-architectures
i386

sudo grep -R proxy /etc/apt/*

grep proxy /etc/environment

echo $http_proxy

echo $ftp_proxy

grep proxy /etc/bash.bashrc

 grep proxy ~/.bashrc

cat /etc/apt/apt.conf

sudo fuser -vvv /var/lib/dpkg/lock

 sudo fuser -vvv /var/cache/apt/archives/lock

 cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"

uname -a
Linux SaundersLab 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

sudo rm /var/lib/apt/lists/lock

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup

sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status

sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

sudo rm -rf /var/lib/dpkg/updates/*

sudo rm -rf /var/lib/apt/lists

sudo rm /var/cache/apt/*.bin

sudo mkdir /var/lib/apt/lists

sudo mkdir /var/lib/apt/lists/partial

LANG=C;sudo apt-get clean

LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done

sudo dpkg --configure -a

sudo dpkg --clear-avail

LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

LANG=C;sudo apt-get --purge autoremove
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

LANG=C;sudo apt-get --fix-missing update -o APT::Cache-Limit=100000000
Ign http://us.archive.ubuntu.com wily InRelease
Ign http://archive.canonical.com wily InRelease
Ign http://us.archive.ubuntu.com wily-security InRelease
Err http://archive.canonical.com wily Release.gpg
  Connection failed [IP: 91.189.92.191 80]
Ign http://us.archive.ubuntu.com wily-updates InRelease
Ign http://archive.canonical.com wily Release
Err http://us.archive.ubuntu.com wily Release.gpg
  Connection failed [IP: 91.189.91.23 80]
Err http://us.archive.ubuntu.com wily-security Release.gpg
  Connection failed [IP: 91.189.91.13 80]
Err http://us.archive.ubuntu.com wily-updates Release.gpg
  Connection failed [IP: 91.189.91.24 80]
Ign http://us.archive.ubuntu.com wily Release
Ign http://us.archive.ubuntu.com wily-security Release
Ign http://us.archive.ubuntu.com wily-updates Release
Err http://archive.canonical.com wily/partner Sources
  Connection failed [IP: 91.189.92.191 80]
Err http://archive.canonical.com wily/partner amd64 Packages
  Connection failed [IP: 91.189.92.191 80]
Err http://archive.canonical.com wily/partner i386 Packages
  Connection failed [IP: 91.189.92.191 80]
Err http://archive.canonical.com wily/partner Translation-en
  Connection failed [IP: 91.189.92.191 80]
23% [Waiting for headers] (stopped at 3 hours)

ping 91.189.92.191
PING 91.189.92.191 (91.189.92.191) 56(84) bytes of data.
64 bytes from 91.189.92.191: icmp_seq=1 ttl=44 time=175 ms
64 bytes from 91.189.92.191: icmp_seq=2 ttl=44 time=142 ms
64 bytes from 91.189.92.191: icmp_seq=3 ttl=44 time=142 ms
^C

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

/etc/apt/sources.list

     1 #------------------------------------------------------------------------------#
     2 # OFFICIAL UBUNTU REPOS #
     3 #------------------------------------------------------------------------------#
     4
     5
     6 ###### Ubuntu Main Repos
     7 deb http://us.archive.ubuntu.com/ubuntu/ wily main restricted universe multiverse
     8 deb-src http://us.archive.ubuntu.com/ubuntu/ wily main restricted universe multiverse
     9
    10 ###### Ubuntu Update Repos
    11 deb http://us.archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
    12 deb http://us.archive.ubuntu.com/ubuntu/ wily-updates main restricted universe multiverse
    13 deb-src http://us.archive.ubuntu.com/ubuntu/ wily-security main restricted universe multiverse
    14 deb-src http://us.archive.ubuntu.com/ubuntu/ wily-updates main restricted universe multiverse
    15
    16 ###### Ubuntu Partner Repo
    17 deb http://archive.canonical.com/ubuntu wily partner
    18 deb-src http://archive.canonical.com/ubuntu wily partner
    19
    20 #------------------------------------------------------------------------------#
    21 # UNOFFICIAL UBUNTU REPOS #
    22 #------------------------------------------------------------------------------#
    23
    24
    25 ###### 3rd Party Binary Repos
    26
    27 #### WebUpd8 PPA - http://www.webupd8.org/
    28 ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4C9D234C
    29 #deb http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu wily main
    30
    31
    32 ####### 3rd Party Source Repos
    33
    34 #### WebUpd8 PPA (Source) - http://www.webupd8.org/
    35 ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4C9D234C
    36 #deb-src http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu wily main
    37
    38
    39

any thoughts? thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Steven Saunders
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

This looks like a network problem, maybe that was just a temporary connection problem.
If you now re-try "sudo apt-get update", does it still fail?
If it still fails, can you try selecting another repository server and try again? Do you see the same problem also with other servers?

Revision history for this message
Steven Saunders (steven-r-saunders) said :
#2

overnight I happened to let:
sudo apt-get update
run overnight. Everything timed out and upon rerunning sudo apt-get update, it fails giving the lock error.

I rebooted, loaded up software manager, and did a "select best server"

My sources.list file is now:

#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#

###### Ubuntu Main Repos
deb http://mirror.tocici.com/ubuntu/ wily main restricted universe multiverse

###### Ubuntu Update Repos
deb http://mirror.tocici.com/ubuntu/ wily-security main restricted universe multiverse
deb http://mirror.tocici.com/ubuntu/ wily-updates main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu wily partner

running sudo apt-get update does the same thing. 0% [Waiting for headers][waiting for headers] for the past 15 minutes.

I can ping the servers listed in the sources.list without a problem. So I don't think it is a network issue since I'm able to hit the servers via pinging or loading in chrome.

Revision history for this message
Steven Saunders (steven-r-saunders) said :
#3

More information...

The institution just set up a new firewall over the weekend... and it is apparently blocking apt requests.

From my knowledge apt only works over http (80), dns(53) and ftp (21) if set up.

According to IT, those ports should be open. Is there anything else that I could be missing?

if ok, I'd like to leave this open a little bit longer to confirm this is an (external) firewall issue.

Thanks again

Revision history for this message
Steven Saunders (steven-r-saunders) said :
#4

Ok confirmed to be a network issue like Manfred thought.

A new firewall was installed that was blocking traffic that wasn't "approved". This traffic has now been alloweded.

Sorry to take your attention away from other issues!

Thanks for all of your help.