unable to resolve

You may find the “can’t resolve hostname” or “temporary failure in name resolution” error when using retrieval command like wgetcURL, ping or nslookup.
We see this problem when NetworkManager fails to work correctly. This is just the most common cause.

hostnames are resolved by your server using "/etc/resolv.conf"

Sometimes NetworkManager will misconfigure this file.

to fix, follow these steps.

  1. disable NetworkManager, this will stop the service from undoing our changes.
    chkconfig NetworkManager off; service NetworkManager stop
  2. edit /etc/resolv.conf, we’ll set our DNS IP’s to use Google’s Public DNS (8.8.8.8 & 8.8.4.4).
    vim /etc/resolv.conf

    nameserver 127.0.0.1
    nameserver 8.8.8.8
    nameserver 8.8.4.4

    Save and quit the file using ESC and :wq.
  3. The change will be instant, so try 
    ping google.com

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)