hdfs增加新的datanode报错Datanode denied communication with namenode

2017-08-25 15:23:35,961 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-41444263-10.31.130.229-1494815561438 (Datanode Uuid 8d7dfef6-8510-4082-beef-a30e76622baa) service to j-ecs-ol-data-datacenter-02/10.31.130.234:8022 beginning handshake with NN

2017-08-25 15:23:35,965 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool BP-41444263-10.31.130.229-1494815561438 (Datanode Uuid 8d7dfef6-8510-4082-beef-a30e76622baa) service to j-ecs-ol-data-datacenter-02/10.31.130.234:8022 Datanode denied communication with namenode because hostname cannot be resolved (ip=10.24.36.14, hostname=10.24.36.14): DatanodeRegistration(10.24.36.14, datanodeUuid=8d7dfef6-8510-4082-beef-a30e76622baa, infoPort=50075, infoSecurePort=0, ipcPort=50020, storageInfo=lv=-56;cid=cluster12;nsid=1627901434;c=0)

at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:914)

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:5088)

at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:1155)

at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.registerDatanode(DatanodeProtocolServerSideTranslatorPB.java:95)

at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtocolProtos.java:28849)

at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617)

at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1060)

at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2086)

at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2082)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:422)

at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)

at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2080)

 

解决方法:

主节点及其它原来的每个节点,hosts文件中都应试加入所有的机器IP及hostname。

你可能感兴趣的:(hadoop)