我正试图在两台机器上运行hadoop。下面提到的是我的core-site.xml文件。
10.0.x.y作为我的主机工作,10.0.x.y1作为从机工作。
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://10.0.x.y:54310</value>
</property>
</configuration>
下面提到的是我的hdfs-site.xml文件
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/data/hadoop-namenode-data</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/data/hadoop-datanode-data</value>
</property>
</configuration>
对于10.0.x.y start-dfs.sh上的命令---我的名称节点和机器10.0.x.y上的datanode运行正常,但namenode.log文件中的错误消息是
2014-07-02 15:49:08,628 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: NameNode RPC up at: TPMOPW388/10.0.7.111:54310
2014-07-02 15:49:08,628 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Starting services required for active state
2014-07-02 15:49:11,268 WARN org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager: Unresolved datanode registration from 10.0.40.18
2014-07-02 15:49:11,268 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:root (auth:SIMPLE) cause:org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: DatanodeRegistration(0.0.0.0, storageID=DS-969520512-10.0.40.18-50010-1404290045109, infoPort=50075, ipcPort=50020, storageInfo=lv=-47;cid=CID-9afd9260-85c3-4018-92a6-cb391f4cfbdd;nsid=471345421;c=0)
2014-07-02 15:49:11,268 INFO org.apache.hadoop.ipc.Server: IPC Server handler 2 on 54310, call org.apache.hadoop.hdfs.server.protocol.DatanodeProtocol.registerDatanode from 10.0.40.18:57523 Call#1 Retry#0: error: org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: DatanodeRegistration(0.0.0.0, storageID=DS-969520512-10.0.40.18-50010-1404290045109, infoPort=50075, ipcPort=50020, storageInfo=lv=-47;cid=CID-9afd9260-85c3-4018-92a6-cb391f4cfbdd;nsid=471345421;c=0)
org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: DatanodeRegistration(0.0.0.0, storageID=DS-969520512-10.0.40.18-50010-1404290045109, infoPort=50075, ipcPort=50020, storageInfo=lv=-47;cid=CID-9afd9260-85c3-4018-92a6-cb391f4cfbdd;nsid=471345421;c=0)
at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:739)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:3929)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:948)
at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.registerDatanode(DatanodeProtocolServerSideTranslatorPB.java:90)
at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtocolProtos.java:24079)
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:2048)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2042)
感谢任何帮助。
答案 0 :(得分:1)
可能与主机名配置有关。检查/etc/hosts
文件,确保每个文件都有IP地址和主机名。
答案 1 :(得分:0)
使用值=&#34;系统中的节点数&#34;在hdfs-site.xml中 并检查你的/ etc / hosts。
答案 2 :(得分:0)
根据这条线:
15:49:11,268 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:root (auth:SIMPLE) cause:org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException: Datanode denied communication with namenode: DatanodeRegistration(0.0.0.0, storageID=DS-969520512-10.0.40.18-50010-1404290045109, infoPort=50075, ipcPort=50020, storageInfo=lv=-47;cid=CID-9afd9260-85c3-4018-92a6-cb391f4cfbdd;nsid=471345421;c=0)
可能由您的名称节点导致无法通过ssh访问您的数据节点。
所以,
确保如果您安装了ssh并配置了私钥,以便在没有密码的情况下登录!