dns lookup broken: "ping: unknown host google.com"

Asked by Krister Swenson

My DNS lookup seems to have recently broken (on an up-to-date 15.04)..

=> ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=41.8 ms

=> ping google.com
ping: unknown host google.com

Does someone happen to have a hint for me?

I found the following links, none of which helped:
http://askubuntu.com/questions/455338/ping-unknown-host-google-com-but-ips-works-fine
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1308378
http://askubuntu.com/questions/465729/ping-unknown-host-google-com-in-ubuntu-server

Thanks for the help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Please run this command:

echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolvconf/resolv.conf.d/head

Then reboot and retest.

Revision history for this message
Krister Swenson (thekswenson) said :
#2

There is no change in behavior after rebooting:

=> tail -1 /etc/resolvconf/resolv.conf.d/head
nameserver 8.8.8.8

=> ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=40.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=40.9 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 40.141/40.528/40.915/0.387 ms

=> ping google.com
ping: unknown host google.com

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What is the output of:

cat /etc/resolvconf/resolv.conf.d/head
lsb_release -a

Thanks

Revision history for this message
Krister Swenson (thekswenson) said :
#4

=> more /etc/resolvconf/resolv.conf.d/head
# 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
nameserver 8.8.8.8

=> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

What is the output of

grep nameserver /etc/resolvconf/resolv.conf /etc/resolvconf/resolv.conf.d/*

Revision history for this message
Krister Swenson (thekswenson) said :
#6

=> grep nameserver /etc/resolvconf/resolv.conf /etc/resolvconf/resolv.conf.d/*
grep: /etc/resolvconf/resolv.conf: No such file or directory
/etc/resolvconf/resolv.conf.d/head:nameserver 8.8.8.8
/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10

Revision history for this message
Krister Swenson (thekswenson) said :
#7

wanted to mention that other machines on the same wireless network have no problems.
also, when i connect through a VPN to work i no longer have an issue (until i disconnect from the VPN).

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

Have you tried rebooting the router

Revision history for this message
Krister Swenson (thekswenson) said :
#9

yes

Revision history for this message
Krister Swenson (thekswenson) said :
#10

Could a corrupt binary be the culprit?
I installed Ubuntu from a USB key so I won't rule that out.
Does anyone know which packages I may want to reinstall if this were the case?

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#11

I suggest removing these entries (any line containing 193.49.104.10) :

/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/original:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10
/etc/resolvconf/resolv.conf.d/tail:nameserver 193.49.104.10

I guess the DNS resolution via 193.49.104.10 is not working.

Your DNS resolution may be going via 193.49.104.10 instead of 8.8.8.8, which could explain the issues you are experiencing.

Just a guess.

Revision history for this message
Krister Swenson (thekswenson) said :
#12

I've removed those lines and rebooted.
It hasn't helped.

Revision history for this message
Krister Swenson (thekswenson) said :
#13

Problem solved:
I removed all occurrences of the IP in any files found using "sudo grep -R -l 193.49.104.10 /etc/*".

Thanks for the help everyone.

Revision history for this message
Krister Swenson (thekswenson) said :
#14

Thanks Mark Rijckenberg, that solved my question.