ping unknown host (can still ping IPs)

Posted October 27, 2014 4.1k views

Ubuntu 12.04.5

I previously had connectivity on this server, but now I can’t ping hostnames. I can ping IPs. I’m no Linux expert so I don’t know how much of this is relevant, but I’ve noticed the following:

a) /etc/resolv.conf is empty.

b) The networking service has a “stop/waiting” status, but network-manager is running.

c) I noticed the problem since creating a Snapshot. This involved shutting down the server. Perhaps the restart caused an issue?

Any help is much appreciated!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Try restarting the networking service:

sudo service networking restart

If that doesn’t fix it and /etc/resolv.conf is still empty, you can edit it manually. Set its contents to:


Without doing anything, it is now working and /etc/resolv.conf is being populated.

I wish D.O. would explain to me what happened here (I did contact their support and I assume they fixed whatever the issue was). Unless I understand the problem I have no way of preventing it from happening again.