AWS/Ubuntu archive server appears to be down?

I am brand new to both AWS and nginx (OSS version). I just created my free-tier (micro t2) EC2 Ubuntu instance and am trying to install nginx on it. So I run sudo apt-get upgrade and then sudo apt-get install nginx and I get the following errors:

Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main fonts-dejavu-core all 2.34-1ubuntu1 [1,024 kB]
Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main fontconfig-config all 2.11.0-0ubuntu4.1 [47.4 kB]
Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libfontconfig1 amd64 2.11.0-0ubuntu4.1 [123 kB]
Get:4 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libjpeg-turbo8 amd64 1.3.0-0ubuntu2 [104 kB]
Get:5 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libjpeg8 amd64 8c-2ubuntu8 [2,194 B]
Get:6 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libjbig0 amd64 2.0-2ubuntu4.1 [26.1 kB]
Get:7 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libtiff5 amd64 4.0.3-7ubuntu0.3 [143 kB]
Get:8 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libvpx1 amd64 1.3.0-2 [556 kB]
Get:9 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libxpm4 amd64 1:3.5.10-1 [38.3 kB]
Get:10 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libgd3 amd64 2.1.0-3 [147 kB]
Get:11 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty/main libxslt1.1 amd64 1.1.28-2build1 [145 kB]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx-common all 1.4.6-1ubuntu3.3
    404  Not Found [IP: <someIp> 80]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx-core amd64 1.4.6-1ubuntu3.3
    404  Not Found [IP: <someIp> 80]
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main nginx all 1.4.6-1ubuntu3.3
    404  Not Found [IP: <someIp> 80]
Fetched 2,356 kB in 1s (1,871 kB/s)
E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx-common_1.4.6-1ubuntu3.3_all.deb  404  Not Found [IP: <someIp> 80]

E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx-core_1.4.6-1ubuntu3.3_amd64.deb  404  Not Found [IP: <someIp> 80]

E: Failed to fetch http://us-west-2.ec2.archive.ubuntu.com/ubuntu/pool/main/n/nginx/nginx_1.4.6-1ubuntu3.3_all.deb  404 Not Found [IP: <someIp> 80]

In reality, <someIp> is an actual IP address, but I'm not sure if that's my IP address or some AWS/Ubuntu archive server. If it's not my IP, I can provide it so long as someone can explain to me what it is and perhaps cite a reference.

I can't tell whether this is an AWS error, and AWS configuration error (maybe I need to tweak some firewall settings, etc.), an nginx error or an issue with apt-get. Any ideas?

Answers


Turns out I just needed to run sudo apt-get update. Not sure why that worked, and nobody on the AWS/EC2 forum was able to offer an explanation either.


I experienced problems with apt-get resolving hostnames once too, though I don't remember the exact error and it doesn't ALWAYS happen. So, try the below?

There appears to be a problem with archive.ubuntu.com (where updates are retrieved from) in Amazon's DNS. So, per instructions here (https://serverfault.com/questions/545188/amazon-ec2-instance-cannot-resolve-hostnames), we need to edit the server's DNS.

We can't do that from within Ubuntu, it needs to be done from the console.

In order to do that:

  1. Go to the VPC service
  2. Click "DHCP Options Set" on the left side
  3. Click the blue "Create DHCP Options Set" button at the top
  4. Pick a unique name (e.g. "Google DNS")
  5. Enter "8.8.8.8, 8.8.4.4" in the "Domain Name Servers field

Additional Info:

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html#AmazonDNS


Need Your Help

Jquery autocomplete is not working

jquery jquery-ui spring-mvc jquery-autocomplete broadleaf-commerce

I am trying to use autocomplete functionality of jquery into my project. But i have no idea why it is not even calling.

Fillling text boxes using Robot-Selenium in an angularJs app does not behave as expected

angularjs selenium selenium-webdriver robotframework

I'm having some trouble writing a robot-selenium test for an angularJs-based app. It looks something like this: