title: Hadoop DNS Resolution
body: <p>I am trying to install a local cluster on a VM. When I have Cloudera Manager open, sometimes the host health check shows as failed and the error message basically says "DNS resolution failed." Sometimes HDFS service shows as failed.  I just would like some ideas on other avenues to troubleshoot. I'm fairly certain it's something simple with the hosts file or some thing with DNS. My OS is Ubuntu.</p>
  
  <p>So far I have edited /etc/hosts to have the exact ipv4 address I got  from running ifconfig  </p>
  
  <pre><code>10.2.0.15  michael-VirtualBox
  </code></pre>
  
  <p>I deleted the entry </p>
  
  <p><code>127.0.0.1   localhost</code>  </p>
  
  <p>I also restarted the networking service.  I executed the command </p>
  
  <p><code>"python -c "import socket; print socket.getfqdn(); print socket.gethostbyname(socket.getfqdn())""</code></p>
  
  <p>I got back </p>
  
  <p><code>127.0.0.1
  localhost</code></p>