title: Hadoop java.net.SocketException: Network is unreachable
body: <p>I´m executing this command in a 4 node hadoop cluster on the namenode node:</p>
  
  <pre><code>hadoop fs -ls /
  </code></pre>
  
  <p>But it shows an error:</p>
  
  <pre><code>ls: Failed on local exception: java.net.SocketException: 
  Network is unreachable; Host Details: local host is "namenode/172.16.1.2"; 
  destination host is: "namenode":9000;
  </code></pre>
  
  <p>core-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;property&gt;
          &lt;name&gt;fs.defaultFS&lt;/name&gt;
          &lt;value&gt;hdfs://namenode:9000&lt;/value&gt;
      &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>cat /etc/hosts:</p>
  
  <pre><code>172.16.1.2  namenode
  172.16.1.3  datanode1
  172.16.1.4  datanode2
  172.16.1.5  datanode3
  </code></pre>