Ubuntu – Ubuntu Server 12.04 apt-get update errors (404, W: Failed to fetch…)

12.04aptserverupdateswebserver

I have a new instance of 12.04 server and have been having issues running sudo apt-get update

The update seems to work fine then it will stop and sit waiting for headers then start spitting 404 errors.

I have tried the following repos in my sources.list with precise and precise-updates etc. also defined to the same mirror:

deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

deb http://uk.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

The 404 errors appear randomly sometimes stopping at Get:100, sometimes stopping at Get:400+

I have now tried a whole different mirror (mirrors.coreix.net) and this seems to go on longer butafter already sometime it is now hanging waiting for headers.

Any ideas? I have searched and searched the forum with many people experiencing similar issues, but nothing already here seems to assist me…

It may also be worth noting that this is on an corporate network and I currently have the Network team checking if there is some sort of DNS issue with our internal nameservers, but I can run host google.com and ping google.com and get an appropriate response with no lost packets or anything.

EDIT: This is the last few lines from the last try that has just completed.

Get:450 http://mirrors.coreix.net precise-security/main Translation-en [168 kB]
Get:451 http://mirrors.coreix.net precise-security/multiverse Translation-en [1,299 B]
Get:452 http://mirrors.coreix.net precise-security/restricted Translation-en [1,253 B]
Get:453 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Get:454 http://mirrors.coreix.net precise-updates/main amd64 Packages [745 kB]
Get:455 http://mirrors.coreix.net precise-updates/universe amd64 Packages [231 kB]
Get:456 http://mirrors.coreix.net precise-updates/main i386 Packages [769 kB]
Get:457 http://mirrors.coreix.net precise-updates/universe i386 Packages [236 kB]
Get:458 http://mirrors.coreix.net precise-updates/main Translation-en [334 kB]
Get:459 http://mirrors.coreix.net precise-updates/multiverse Translation-en [8,293 B]
Get:460 http://mirrors.coreix.net precise-updates/restricted Translation-en [2,859 B]
Get:461 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise-security/universe amd64 Packages
  404  Not Found
Err http://mirrors.coreix.net precise-security/main i386 Packages
  404  Not Found
Err http://mirrors.coreix.net precise-updates/main amd64 Packages
  404  Not Found
Err http://mirrors.coreix.net precise-updates/universe amd64 Packages
  404  Not Found
Err http://mirrors.coreix.net precise-updates/main i386 Packages
  404  Not Found
Err http://mirrors.coreix.net precise-updates/universe i386 Packages
  404  Not Found
Get:462 http://mirrors.coreix.net precise/main Translation-en [726 kB]
Get:463 http://mirrors.coreix.net precise/multiverse Translation-en [93.4 kB]
Get:464 http://mirrors.coreix.net precise/restricted Translation-en [2,018 B]
Get:465 http://mirrors.coreix.net precise/universe Translation-en [3,341 kB]
Get:466 http://mirrors.coreix.net precise-security/main Translation-en [168 kB]
Get:467 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Get:468 http://mirrors.coreix.net precise-updates/main Translation-en [334 kB]
Get:469 http://mirrors.coreix.net precise-updates/multiverse Translation-en [8,293 B]
Get:470 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise/main Translation-en
  Connection failed
Get:471 http://mirrors.coreix.net precise/multiverse Translation-en [93.4 kB]
Err http://mirrors.coreix.net precise/multiverse Translation-en
  Connection failed
Err http://mirrors.coreix.net precise/universe Translation-en
  Connection failed
Err http://mirrors.coreix.net precise-security/main Translation-en
  Connection failed
Get:472 http://mirrors.coreix.net precise-security/universe Translation-en [56.3 kB]
Err http://mirrors.coreix.net precise-security/universe Translation-en
  Connection failed
Err http://mirrors.coreix.net precise-updates/main Translation-en
  Connection failed
Get:473 http://mirrors.coreix.net precise-updates/universe Translation-en [135 kB]
Err http://mirrors.coreix.net precise-updates/universe Translation-en
  Connection failed
Fetched 12.8 MB in 1h 39min 45s (2,143 B/s)
W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/universe/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/binary-i386/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/binary-i386/Packages  404  Not Found

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/main/i18n/Translation-en  Connection failed

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/multiverse/i18n/Translation-en  Connection failed

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise/universe/i18n/Translation-en  Connection failed

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/main/i18n/Translation-en  Connection failed

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-security/universe/i18n/Translation-en  Connection failed

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/main/i18n/Translation-en  Connection failed

W: Failed to fetch gzip:/var/lib/apt/lists/partial/mirrors.coreix.net_ubuntu_dists_precise-updates_multiverse_i18n_Translation-en  Encountered a section with no Package: header

W: Failed to fetch http://mirrors.coreix.net/ubuntu/dists/precise-updates/universe/i18n/Translation-en  Connection failed

E: Some index files failed to download. They have been ignored, or old ones used instead.
admin@SNOAP01:/etc$ 

Best Answer

It can be, that some servers are down for a while - due to maintenance. Or that some packages/repositories are not given any more (like medibuntu).

So you can launch update-manager via menu-entry "system-tools". Then in menue of update-manager click at "edit" - choose there "software sources". Then you can check in the list of "Software & Updates" in tab "other software", where hook is set too much or where hook is missing.

In terminal you can check with ... :

sudo apt-get update

which entry is causing the error message of concerning server.

Then you know, where to set a missing hook in "other software" or where to remove a hook.