Datanode denied communication with namenode because hostname cannot be resol
Posted on 2020-10-17 10:31 锦喵卫指挥使 阅读(1044) 评论(1) 编辑 收藏 举报Datanode denied communication with namenode because hostname cannot be resol
root@bigdata01:~/tools# start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [192.168.16.141]
192.168.16.141: starting namenode, logging to /root/training/hadoop-2.7.3/logs/hadoop-root-namenode-bigdata01.out
192.168.16.138: starting datanode, logging to /root/training/hadoop-2.7.3/logs/hadoop-root-datanode-bigdata02.out
192.168.16.139: starting datanode, logging to /root/training/hadoop-2.7.3/logs/hadoop-root-datanode-bigdata03.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /root/training/hadoop-2.7.3/logs/hadoop-root-secondarynamenode-bigdata01.out
starting yarn daemons
starting resourcemanager, logging to /root/training/hadoop-2.7.3/logs/yarn-root-resourcemanager-bigdata01.out
192.168.16.139: starting nodemanager, logging to /root/training/hadoop-2.7.3/logs/yarn-root-nodemanager-bigdata03.out
192.168.16.138: starting nodemanager, logging to /root/training/hadoop-2.7.3/logs/yarn-root-nodemanager-bigdata02.out
root@bigdata01:~/tools# jps
5682 NameNode
5924 SecondaryNameNode
6329 Jps
6077 ResourceManager
由于配置hadoop没有使用host+hostName的配置方式,导致了hadoop无法解析DataNode,对DataNode的注册失败。
解决方案:hdfs-site.xml中添加
<property>
<name>dfs.namenode.datanode.registration.ip-hostname-check</name>
<value>false</value>
</property>