Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to do an apt-get update or apt-get install xyz and I'm seeing timeouts like this:

W: Failed to fetch http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  
Unable to connect to eu-west-1.ec2.archive.ubuntu.com:http: [IP: 10.224.87.159 80]

Is this a transient issue with Ubuntu, or maybe it's something on my end. The box I'm accessing it from is in EC2-EU.

Perhaps there is a way to force the installer to use the US servers which seem to work?

share|improve this question
I might note that I don't see this issue from a US box, only from the server running in the amazon EU datacenter (Ireland). – David Parks Sep 23 '11 at 20:27
1  
Can't get to the server either. Just use another mirror. – arrange Sep 23 '11 at 21:09
How do I change mirrors? If you could post some bit of direction on that as an answer it would be a great help. – David Parks Sep 23 '11 at 21:11

1 Answer

up vote 5 down vote accepted

Firstly, I assume the timeouts are a transient problem with Ubuntu update servers in that region.

It should be noted that EC2 Ubuntu AMIs point to update servers hosted on the EC2 region you are using. It's fast (~10Mbps) and you don't pay for the bandwidth.

Having said that, there's nothing enforced about where you get your updates from. You can change your /etc/apt/sources.list to point to different update servers in a different region. Two suggestions for a workaround:

  • copy a sources.list from the US region over to your EU hosts.
  • add the following line to the top of your sources.list:
    deb mirror://mirrors.ubuntu.com/mirrors.txt oneiric main restricted universe multiverse

What's neat about the second solution is that this "mirrors.txt" file is dynamically generated via GeoIP and should always return a good and relatively close mirror. It's great for us Ubuntu users who find themselves travelling frequently.

Again, given the special nature of the archive servers on EC2, I wouldn't normally do this on a cloud instance. And I would only do either of these workarounds as a temporary measure. The problem, wherever it may be, is transient and I would expect it to be fixed fairly quickly.

share|improve this answer
Aha, now I understand it. I built this box off of the Amazon AMI images on cloud.ubuntu.com and it plugged in the local server (which is not working as it appears). I commented out all lines with that server and added your mirror:// line at the top and things seem to work. Let me know if commenting out all the other lines has some negative side effects. – David Parks Sep 23 '11 at 21:25
Hmm. That's pretty interesting. It didn't occur to me that the deb mirror:// line would work all by itself, but it makes sense now that you mention it. As long as it's working, I don't see a problem at all. Having said that, it would probably work just as well with the original entries left intact. The mirror line just needs to come first. – Mark Russell Sep 23 '11 at 21:36
There were about 6 lines referencing the bad server, it did work commenting them out and leaving just this line, I was able to do the installs of all the software I needed. – David Parks Sep 24 '11 at 20:51

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.