0

数据节点日志是

2021-03-11 07:25:04,313 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-1712216253-10.10.10.21-1615391864284 (Datanode Uuid null) service to node1/10.10.10.21:8020 beginning handshake with NN
2021-03-11 07:25:04,315 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool BP-1712216253-10.10.10.21-1615391864284 (Datanode Uuid null) service to node1/10.10.10.21:8020 Datanode denied communication with namenode because the host is not in the include-list: DatanodeRegistration(10.10.10.108:50010, datanodeUuid=dceb7078-c900-4d77-aebc-85452bf96a37, infoPort=50075, infoSecurePort=0, ipcPort=50020, storageInfo=lv=-56;cid=CID-d8e17d65-b242-4e5d-b801-f7d269653085;nsid=1669411016;c=0)
        at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:865)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:4481)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:1286)
        at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.registerDatanode(DatanodeProtocolServerSideTranslatorPB.java:96)
        at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtocolProtos.java:28752)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2217)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2213)
        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:1754)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2211)

我有一个 namenode ip 是 10.10.10.21 和一个 datanode 10.10.10.22 。配置双网卡上网。datanode的dhcp ip为10.10.10.108。当我启动我的 hdfs 集群时,datanode 无法注册到 namenode。

我尝试关闭我的dhcp网络,datanode可以注册namenode成功。但是datanode无法访问互联网。

那么,如何在我的datanode上同时上线并成功注册namenode呢?

4

0 回答 0