Skip to content

EC2 Instance Temporary failure in name resolution/Empty resolv.conf file

1

I had a working ec2 instance, but have not logged into it for some time. I wanted to re-visit an old project and when I logged in via ssh I noticed that the storage space had filled up. I am using an influxdb database together with grafana and telegraf, and when attempting to clear up some storage space I started running into this "unable to resolve host ip-<iphere>: Temporary failure in name resolution" when trying to execute some commands. Upon further inspection after not being able to "ping google.com" (" Temporary failure in name resolution" error again) I saw that the /etc/resolv.conf file was completely empty, and it seems that the dhclient did not create this file upon startup of the instance.

I have tried rebooting the instance and stopping and starting the instance, but neither of these worked. Could somebody please give some advice on what to try next?

  • Im also in a similar situation where, after relaunching (and giving more space to my volume to avoid that no space left on device error) and reconnection with terminal I had to add this line "127.0.0.1 ip-NEW.IP.NUMBER" on /etc/hosts in order to recognize the "sudo" command. anyway Im also getting those kind of problems and also getting this "ping google.com" (" Temporary failure in name resolution" error again)

asked 4 years ago7.2K views
No Answers

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.