Unable to Resolve Host IP

Posted on Thursday, December 20, 2012



Unable to Resolve Host IP


Every so often I get this error from the command line from ubuntu 12.04 LTS in the Amazon AWS cloud.


unable to resolve host ip-XX-X-XX-XXX







Get the machine name, run this command



      > hostname








I get ip-10-0-11-227



Update the /etc/hosts file



      >  sudo vi /etc/hosts


And add this line to the end of the file




127.0.0.1 ip-10-0-11-227


And save it












That should fix it.



References


2 comments:

  1. Real fix is : http://serverfault.com/questions/315560/unable-to-resolve-host-error-whenever-running-a-command-with-sudo-on-ubuntu-we/598108#598108

    ReplyDelete