7

I have Xubuntu 14.04 installed on my server. network-manager is not installed. It seems to have lost its ability to resolve domains, and I'm not sure where to begin diagnosing the issue.

ping 8.8.8.8 pings normally.

ping google.com returns ping: unknown host google.com.

I tried adding a DNS server to /etc/network/interfaces/. Now it contains:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.100
gateway 192.168.0.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

This didn't fix the problem, so I tried running:

hesse@galois:~$ sudo service networking restart
stop: Job failed while stopping
start: Job is already running: networking

I tried stop then start and reload but they didn't seem to do anything.

How do I diagnose the problem?

Note: It is a lot of work for me to restart the machine (I need to connect a keyboard and monitor to it), so please suggest solutions that don't require restarting if possible.


/etc/resolv.conf:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  • Can you add the contents of /etc/resolv.conf to your question? That's the file that most resolvers will use to find which DNS servers to use – Eric Renouf Apr 10 '16 at 2:05
  • @EricRenouf Sure, it's empty except for the comment. – Superbest Apr 10 '16 at 2:07
  • well that's the problem I suspect. Not being able to restart networking is a problem, but are you sure you're not using NetworkManager instead? – Eric Renouf Apr 10 '16 at 2:09
  • Also, as a temporary solution you could just edit resolv.conf not withstanding that comment and add nameserver 8.8.8.8, but it will likely be overwritten at some point so that is just a temporary fix – Eric Renouf Apr 10 '16 at 2:11
  • 1
8

You need to solve the emptiness of your /etc/resolv.conf before hoping for some other error.

It should reflect at least one resolver. Should this be the only problem, your resolving should work.

Try

vi /etc/resolv.conf

Go into the edit mode. Add the below thing:

nameserver 8.8.8.8
nameserver 8.8.4.4

See post that if

ping google.com

Works.

0

Try this:

sudo nano /etc/resolvconf/resolv.conf.d/tail

Which will open a blank resolv.conf.d file in the nano text editor. You will need to place your DNS server address on the first line of this file and remember to end the line with a carriage return (hit enter) as seen below:

nameserver 8.8.8.8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.