hadoop环境报failed on connection exception

ls: Call From slaver1/127.0.0.1 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; 
For more details see:   http://wiki.apache.org/hadoop/ConnectionRefused
在搭建分布式环境的时候,发现在DataNode中使用命令:
hdfs dfs -ls /
ls: Call From slaver1/127.0.0.1 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; 
For more details see:   http://wiki.apache.org/hadoop/ConnectionRefused


我们在通过 http://wiki.apache.org/hadoop/ConnectionRefused 网页的最后一句:
None of these are Hadoop problems, they are host, network and firewall configuration issues. As it is your cluster,  only you can find out and track down the problem.
了解到,如果你的所有配置都是正确的,那么这个问题只能是host,network,firewall.
在帮助文档中,我看到有这么一句话:
Check that there isn't an entry for your hostname mapped to 127.0.0.1 or 127.0.1.1 in /etc/hosts (Ubuntu is notorious for this)
于是我打开master中的hosts文件,查看是否有 127.0.0.1 

还真的存在这么个东西,于是我将这行给注释掉


然后将hdfs环境重启,再次执行,发现成功了。。。
这个是master节点的信息:

这个是slaver1节点的信息:


最后,送大家文档最后的一句话:
 As it is your cluster,  only you can find out and track down the problem.
大家共勉!

  • 11
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值