Sunday, May 5, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 13474  / 1 Year ago, mon, december 19, 2022, 4:49:20

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?


More From » installation

 Answers
0

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.


[#43375] Wednesday, December 21, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wheance

Total Points: 314
Total Questions: 96
Total Answers: 112

Location: Benin
Member since Thu, Aug 12, 2021
3 Years ago
;