report: Call From slave1.hadoop/192.168.1.106 to namenode:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused”
其中namenode是主節點。於是去主節點上查看了一下端口信息,主節點上執行命令:
sudo netstat -nap|grep 90
發現9000端口的狀態是TIME_WAIT,於是百度了一下,參考了一下高手說的方法,改了一下主節點的hosts文件重啓hdfs,子節點上執行命令"hdfs dfsadmin -report"不再報錯。原文地址:
http://blog.csdn.net/renfengjun/article/details/25320043
我的主節點hosts文件其中有一行如下:
::1 namenode localhost6.localdomain6 localhost6
裏面的namenode就是主節點主機名,把該行註釋(前面加個#號)
#::1 namenode localhost6.localdomain6 localhost6
重啓(執行:$./stop-all.sh 再執行 $./start-all.sh)