Call to localhost/127.0.0.1:9000 failed on connection exception:java.net.ConnectException

今天启动自己编译好的的hadoop2.5.2[ubuntu12.04 x86],在执行hadoop dfsadmin -report之后遇到如下错误:

report: Call From java.net.UnknownHostException: ubuntu-larntin: ubuntu-larntin to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused;

然后到网上去找解决方案:

a)首先关闭全部已启动的服务;

b)执行bin/hdfs namenode -format;

c)/etc/hosts中不要有 ::1 的段,屏蔽掉;再重启试试;

我就是这样就解决了。

你可能感兴趣的:(java,hadoop,exception,ubuntu)