hadoop connection refused on port 9000

The short and sweet answer is that your node service is not running. simply do

$HADOOP_HOME/bin/hdfs

Use absolute path for this and make sure the hadoop user has permissions to access this directory:-

<property>
    <name>dfs.data.dir</name>
    <value>~/hacking/hd-data/dn</value>
  </property>

also make sure you format this path like

# hadoop namenode -format

Modify the core-sit.xml from

hdfs://localhost:9000

to

hdfs:// YOUR REAL MASTER IP ADDRESS:9000

e.g.

hdfs://192.168.111.10:9000

works for me!