Record: Hadoop 2.5.2 cluster dynamically adds new datanodes and cannot communicate

But using hdfs dfsadmin -report on the namenode cannot see the newly added datanode.

View the datanode log:

2014-12-02 18:48:42,046 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-1446562160-127.0.0.1-1417496109738 (Data
node Uuid null) service to /172.16.110.133:9000 beginning handshake with NN
2014-12-02 18:48:42,123 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool BP-1446562160-12
7.0.0.1-1417496109738 (Datanode Uuid null) service to /172.16.110.133:9000 Datanode denied communication with namenode because hostn
ame cannot be resolved (ip=172.16.110.132, hostname=172.16.110.132): DatanodeRegistration(0.0.0.0, datanodeUuid=91493e2e-8525-4971-b
d06-3248dc3b8787, infoPort=50075, ipcPort=50020, storageInfo=lv=-55;cid=CID-118021aa-dc88-4fa3-81db-f203b3502726;nsid=1575155189;c=0
)
        at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:874)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:4514)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:1017)
        at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.registerDatanode(DatanodeProtocolServerSideTrans
latorPB.java:92)
        at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtoco
lProtos.java:28057)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2013)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2009)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2007)

 

DNS resolution problem:

Modify the /etc/hosts file on the namenode, add the ip configuration of the new datanode, and the problem is solved.

Question: The datanode has been connected to the namenode, and the data directory has been generated, and the clusterID has been obtained. The communication between the namenode and the datanode is successful. Why do you need to configure hosts?

 

http://blog.itpub.net/195110/viewspace-1354684/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326485676&siteId=291194637