Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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$ 
share|improve this question
    
By chance, are you using a proxy? –  douggro Jan 31 at 8:26
    
I wasn't, but I am now and it resolved the issue. Check out my post below. –  Kai Feb 1 at 9:57
add comment

2 Answers 2

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.

share|improve this answer
1  
This is ubuntu server with no GUI, these errors are happening with sudo apt-get update –  Kai Jan 31 at 7:10
    
Have overseen this ... you could then edit /etc/apt/sources.list - check there if there is some entry too much ?! But only if you are sure, that server is not down for a while and server is back in next weeks ?! And you could check if the http-entry of this correct or had been modified before your "error" occurred. You should decide only for one server - not for US plus UK both with same entries - this can cause conflict. –  dschinn1001 Jan 31 at 7:14
1  
I have tried mirrors in the us, uk and norway. And now I am using a totally different mirror to the XX.archive.ubuntu.com/ubuntu/ mirror Surely not all these servers will be down? Also it seems to get past the issue sometimes and then stop randomly at another point spewing 404 errors and or sitting waiting for headers. –  Kai Jan 31 at 7:16
    
If some entries are the same, I would choose only one server with this entry. In case you later really need the other servers too, you can modify it anyway... –  dschinn1001 Jan 31 at 7:19
1  
No entries are the same, there is a mirror defined for precise, precise-updates and precise-security for the main, restricted, universe and multiverse repos. The last attempt just completed with errors. I have added the output to the post above. –  Kai Jan 31 at 7:37
add comment
up vote 0 down vote accepted

OK - after some investigation, the name servers that I was provided for this server were not passing the request through correctly due to some strange way we have traffic filtered within the network. I added a proxy that I knew went around this filter to /etc/environment using http_proxy=ip.of.proxy.server:port and voila! It now works.

I post this in case it helps someone else having a similar headache!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.