VMware Communities
resting
Contributor
Contributor

Able to ping but not able to resolve hostname with wget?

Running Ubuntu VM, and I'm able to ping google.com but unable to wget. See error below:

root@ubuntu:~# wget google.com

--2014-11-02 21:07:00--  http://google.com/

Resolving google.com (google.com)... failed: No address associated with hostname.

wget: unable to resolve host address ‘google.com’

root@ubuntu:~# ping google.com

PING google.com (74.125.200.138) 56(84) bytes of data.

64 bytes from sa-in-f138.1e100.net (74.125.200.138): icmp_seq=1 ttl=44 time=7.57 ms

64 bytes from sa-in-f138.1e100.net (74.125.200.138): icmp_seq=2 ttl=44 time=111 ms

^C

--- google.com ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1002ms

rtt min/avg/max/mdev = 7.575/59.766/111.958/52.192 ms

Any idea what could be wrong?

Tags (1)
Reply
0 Kudos
2 Replies
a_p_
Leadership
Leadership

Plesae see whether the solution in http://serverfault.com/questions/76421/wget-cant-resolve-host helps.

André

resting
Contributor
Contributor

Right, so I edited /etc/network/interfaces and added dns-nameservers 8.8.8.8 8.8.4.4 and it works now.

Reply
0 Kudos