EC2 Ubuntu instance can't make requests to the internet

0

No changes were made to an instance running Ubuntu 18.04.2 and suddenly it can't connect to the internet. Running any of the commands below fails:

ping google.com
curl google.com

After investigating a bit, I noticed the following error message in the logs for the systemd-networkd.service:

eth0: DHCP error: could not get routes: No data available

This seems like an issue with the underlying infrastructure but I have already tried stopping and starting the instance again but nothing changes.

By the way, I have already run the basic network checks listed here (Security Group rules are ok, route table is ok, internet gateway is ok and network ACL is ok)

Any help will be greatly appreciated.

Thank you!

  • Is Internet gateway configured for Public subnets? Is NAT gateway configured for Private subnets? Are the correct Route tables attached to the respective subnets? Do the hosts in Public subnets have Public or Elastic IP? Do Security Group and NACL permit outbound traffic? If you still can't find the solution consult VPC Flow Logs, there may be some clue.

  • Hi @Ravi Shanker, thanks for the comment. The answer to all your questions is yes. This was an instance that had been running without interruption for a couple of years and then suddenly that issue happened without any settings changes to anything (subnets, NAT gateways, security groups, etc.). As I posted below, after moving it to another availability zone, the problem was solved. My guess is that there was some issue with the underlying hardware so I suppose if I had simply created a new instance and attached the same EBS volume to it, that would have fixed it too.

1 Answer
0

I ended up creating a snapshot from the instance's volume and then I recreated that volume in a different availability zone. I then launched a new instance in that availability zone and attached the volume to it and things worked fine. So I really think there was some issue with the underlying hardware.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions