Datanodes available: 0 (0 total, 0 dead)

       相信大家在搭建hadoop之后经常会出现Datanodes available: 0 (0 total, 0 dead)的问题,出现这种问题的原因很多,其他原因网上都有介绍。今天讲一讲本人出现的问题点,出现这个问题后首先查看datanode日志文件发现:

WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: master/192.168.65.133:9000。

后面从网上搜到的解决方法如下:

I had exactly same problem and when I checked datanodes logs, there were lots of could not connect to master:9000, and when I checked ports on master via netstat -ntlp I had this in output:

tcp 0 0 127.0.1.1:9000 ...

I realized that I should change my master machine name or change master in all configs. I decided to do the first cause it seems much easier. so I modified /etc/hosts and changed 127.0.1.1 master to 127.0.1.1 master-machine and added an entry at the end of the file like this:

192.168.1.1 master

Then I changed master to master-machine in /etc/hostname and restart the machine. The problem was gone.

意思是配置的

<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>

</property>

中的master不能和主机名相同,否则9000端口会被占用,将主机名修改之后就不会有这个问题了

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值