Apt-get update wont run and gives 503 service unavailable error

Hi,

I am running on Ubuntu 12 (precise) 64 bit and came to know that i cannot install any packages using apt-get and aptitude.

Linux test01 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

But the same /etc/apt/sources.list file is working on one of the production machine and even i have tested wget and this is working fine too.

Btw i am seeing below error:

apt-get update
Ign Ubuntu security notices | Ubuntu precise-security InRelease
Ign Ubuntu security notices | Ubuntu precise-security Release.gpg
Ign Ubuntu security notices | Ubuntu precise-security Release
Ign Index of / precise InRelease
Ign Index of / precise-updates InRelease
Ign Index of / precise-backports InRelease
Ign Index of / precise Release.gpg                                                         
Ign Index of / precise-updates Release.gpg                                                 
Ign Index of / precise-backports Release.gpg
Ign Ubuntu security notices | Ubuntu precise-security/main TranslationIndex
Ign Index of / precise Release          
Ign Ubuntu security notices | Ubuntu precise-security/multiverse TranslationIndex
Ign Index of / precise-updates Release  
Ign Index of / precise-backports Release
Ign Ubuntu security notices | Ubuntu precise-security/restricted TranslationIndex
Ign Ubuntu security notices | Ubuntu precise-security/universe TranslationIndex
Ign Index of / precise/main TranslationIndex
Ign Index of / precise/multiverse TranslationIndex
Ign Index of / precise/restricted TranslationIndex
Ign Index of / precise/universe TranslationIndex
Ign Index of / precise-updates/main TranslationIndex
Ign Index of / precise-updates/multiverse TranslationIndex
Ign Index of / precise-updates/restricted TranslationIndex
Ign Index of / precise-updates/universe TranslationIndex
Ign Index of / precise-backports/main TranslationIndex
Ign Index of / precise-backports/multiverse TranslationIndex
Ign Index of / precise-backports/restricted TranslationIndex
Ign Index of / precise-backports/universe TranslationIndex
Err Ubuntu security notices | Ubuntu precise-security/main Sources
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/restricted Sources                                        
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/universe Sources                                          
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/multiverse Sources                                        
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/main amd64 Packages                                       
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/restricted amd64 Packages
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/universe amd64 Packages
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/multiverse amd64 Packages
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/main i386 Packages
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/restricted i386 Packages                                  
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/universe i386 Packages                                    
  503  Service Unavailable [IP: 91.189.92.201 80]
Err Ubuntu security notices | Ubuntu precise-security/multiverse i386 Packages
  503  Service Unavailable [IP: 91.189.92.201 80]
Ign Ubuntu security notices | Ubuntu precise-security/main Translation-en
Ign Ubuntu security notices | Ubuntu precise-security/multiverse Translation-en
Ign Ubuntu security notices | Ubuntu precise-security/restricted Translation-en
Ign Ubuntu security notices | Ubuntu precise-security/universe Translation-en
Err Index of / precise/main Sources    
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/restricted Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/universe Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/multiverse Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/main amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/restricted amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/universe amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/multiverse amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/main i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/restricted i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/universe i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise/multiverse i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/main Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/restricted Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/universe Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/multiverse Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/main amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/restricted amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/universe amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/multiverse amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/main i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/restricted i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/universe i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-updates/multiverse i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/main Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/restricted Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/universe Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/multiverse Sources
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/main amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/restricted amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/universe amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/multiverse amd64 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/main i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/restricted i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/universe i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Err Index of / precise-backports/multiverse i386 Packages
  503  Service Unavailable [IP: 91.189.91.15 80]
Ign Index of / precise/main Translation-en
Ign Index of / precise/multiverse Translation-en
Ign Index of / precise/restricted Translation-en
Ign Index of / precise/universe Translation-en
Ign Index of / precise-updates/main Translation-en
Ign Index of / precise-updates/multiverse Translation-en
Ign Index of / precise-updates/restricted Translation-en
Ign Index of / precise-updates/universe Translation-en
Ign Index of / precise-backports/main Translation-en
Ign Index of / precise-backports/multiverse Translation-en
Ign Index of / precise-backports/restricted Translation-en
Ign Index of / precise-backports/universe Translation-en
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/source/Sources  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/source/Sources  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/source/Sources  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/source/Sources  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/main/binary-i386/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/restricted/binary-i386/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/binary-i386/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/multiverse/binary-i386/Packages  503  Service Unavailable [IP: 91.189.92.201 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/multiverse/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/main/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/universe/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/main/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/universe/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/source/Sources  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-amd64/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages  503  Service Unavailable [IP: 91.189.91.15 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

HTTP Error 503 Service unavailable Explained

EDIT:
Besides, some of the files give a 404..
I'd assume either outdated, mirrors out of sync, or evil goblins are after you :wink:

EDIT2:
However, the IP (91.189.91.15) works splendid for me!

p 91.189.91.15 
PING 91.189.91.15 (91.189.91.15) 56(84) bytes of data.
64 bytes from 91.189.91.15: icmp_seq=1 ttl=44 time=196 ms

--- 91.189.91.15 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 196.138/196.138/196.138/0.000 ms

Thanks for your reply. But when i try to run

from other production machine it is working fine.

Has the testing machine a running network.service? (eg: NetworkManager.service)

Have you seen the edits of first answer?

ping 91.189.91.15
PING 91.189.91.15 (91.189.91.15) 56(84) bytes of data.
64 bytes from 91.189.91.15: icmp_req=1 ttl=52 time=80.3 ms
64 bytes from 91.189.91.15: icmp_req=2 ttl=52 time=80.5 ms
64 bytes from 91.189.91.15: icmp_req=3 ttl=52 time=80.1 ms
64 bytes from 91.189.91.15: icmp_req=4 ttl=52 time=80.4 ms
64 bytes from 91.189.91.15: icmp_req=5 ttl=52 time=80.7 ms
64 bytes from 91.189.91.15: icmp_req=6 ttl=52 time=80.3 ms
64 bytes from 91.189.91.15: icmp_req=7 ttl=52 time=80.2 ms
64 bytes from 91.189.91.15: icmp_req=8 ttl=52 time=80.3 ms

---------- Post updated at 01:54 PM ---------- Previous update was at 01:33 PM ----------

Is there a way to remove all packages and start over unsing apt-get or aptitude, without re-installing the o/s?

You could first try to cleanup the cache:

sudo apt-get clean

Retry normal update...

Only IF regular update still wont work, then you might try to reinstall everything again.

sudo apt-get reinstall apt-get aptitude
sudo apt-get reinstall $(dpkg --get-selections | grep -v deinstall)

hth

But i bet there's a better option than to reinstall everything, it just wont pop up, atm...

apt-get reinstall apt-get aptitude
E: Invalid operation reinstall

Sorry forgot the leading dashes...: --

$ man apt-get | grep reinsta -A2
       --reinstall
           Re-Install packages that are already installed and at the newest
           version. Configuration Item: APT::Get::ReInstall.

Sorry none of them were working, i mean i am not able to move forward with

apt-get --reinstall

What do you mean my that?

Its clear that apt-get --reinstall needs some arguments, which should be retrieved by $(dpkg --get-selections | grep -v deinstall)

You could save that output first to a file, if you want to manipulate it, or save this processing time for repeating trials...

echo $(dpkg --get-selections | grep -v deinstall) > reinstall.list

Not sure if dkpg requires sudo (as you used in previous examples).

That would save the output of dpkg --get-selections to ./reinstall.list.
So we should be able to process further with:

sudo apt-get --reinstall $(cat reinstall.list)

Of course you first can review reinstall.list, which i highly recomend - if there are more columns, we'd need to prepare it more.
I have a script updating my system, so i usualy dont pay attention to default outputs unless i start parsing it, so i'm not fully certain of how the output of that command is, as i'm today on rpm-based systems.

I have tested for one package and it was not successful.

sudo apt-get --reinstall install rpm     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of rpm is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Btw i dont bother about the packages installed, but atleast i want to fix apt-get

Yeah, apt-get systems dont support rpm systems and vice-versa.. :wink:
One is RedHat (CentOS, Fedora, Scientific Linux) the other is Debian (Mint, [KLUX]buntu).
Those use completly diffrent packaging systems.

You just tried to (re-)install a non-existent package.
--

Have a try with:

sudo apt-get --reinstall apt-get

That is considered to be worthwhile before upgrading/reinstalling the rest of the system.

rpm package is already installed, just tried to run reinstall to see if it fixes the issue.

dpkg -s rpm
Package: rpm
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 448
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 4.9.1.1-1ubuntu0.1
Replaces: manpages-pl (<< 20051017-1)
Depends: libc6 (>= 2.14), libelf1 (>= 0.131), libpopt0 (>= 1.14), librpm2 (>= 4.9.0), librpmbuild2 (>= 4.9.0), librpmio2 (>= 4.9.0), librpmsign0 (>= 4.9.0), perl, rpm2cpio, rpm-common (= 4.9.1.1-1ubuntu0.1)
Suggests: alien, elfutils, rpm-i18n
Breaks: man-db (<< 2.5.0-1), manpages-pl (<< 20051017-1)
Description: package manager for RPM
 The RPM Package Manager (RPM) is a command-line driven package
 management system capable of installing, uninstalling, verifying,
 querying, and updating computer software packages.
 .
 On Debian and derived systems it is recommended to use "alien" to
 convert RPM packages into .deb format instead of bypassing the Debian
 package management system by installing them directly with rpm.
Homepage: rpm - Trac
Original-Maintainer: Michal Čihař <nijel@debian.org>

Can you post the output of the cache cleaning please.

I dont see any output when doing

apt-get clean
sudo apt-get clean
# just for fun
sudo apt-get -s clean

Did you change your sources.list by chance?
Because by now the mirrors should be in sync again...
Are you by chance behind a proxy?

apt-get -s clean
Del /var/cache/apt/archives/* /var/cache/apt/archives/partial/*
Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin

Please read the edits.

What about the first line?

No i did not change the sources.list file

Btw i am not behind the proxy

Ok, then sorry.
Me too tired atm to stay on. Catch you later.