ping unknown host (can still ping IPs)

October 27, 2014 3.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!

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.

Have another answer? Share your knowledge.