title: Hadoop - java.net.ConnectException: Connection refused
body: <p>I want connect to hdfs (in localhost) and i have a error:</p>
  
  <p>Call From despubuntu-ThinkPad-E420/127.0.1.1 to localhost:54310 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  <a href="http://wiki.apache.org/hadoop/ConnectionRefused" rel="nofollow">http://wiki.apache.org/hadoop/ConnectionRefused</a></p>
  
  <p>I follow all the steps in other posts, but i dont solve my problem. I use hadoop 2.7 and this is configurations:</p>
  
  <p>core-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;property&gt;
      &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
      &lt;value&gt;/home/despubuntu/hadoop/name/data&lt;/value&gt;
    &lt;/property&gt;
  
    &lt;property&gt;
      &lt;name&gt;fs.default.name&lt;/name&gt;
      &lt;value&gt;hdfs://localhost:54310&lt;/value&gt;
    &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>hdfs-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;property&gt;
      &lt;name&gt;dfs.replication&lt;/name&gt;
      &lt;value&gt;1&lt;/value&gt;
    &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I type /usr/local/hadoop/bin/hdfs namenode -format and
  /usr/local/hadoop/sbin/start-all.sh</p>
  
  <p>But when i type "jps" the result is:</p>
  
  <pre><code>10650 Jps
  4162 Main
  5255 NailgunRunner
  20831 Launcher
  </code></pre>
  
  <p>I need help...</p>