ping unknown host (can still ping IPs)

  • Posted on October 27, 2014
  • ncmv505Asked by ncmv505

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!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

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: