当前位置:   article > 正文

启动hadoop发现slave中jps没有datanode进程_warn org.apache.hadoop.hdfs.server.datanode.datano

warn org.apache.hadoop.hdfs.server.datanode.datanode: ending block pool serv

现象:

在slave1中jps发现没有datanode进程,查看日志hadoop-root-datanode-slave1.log发现:

2019-04-14 11:45:25,093 INFO org.apache.hadoop.hdfs.server.common.Storage: Lock on /usr/hadoop/hadoop-2.7.3/hdfs/data/in_use.lock acquired by nodena
me 4517@slave1
2019-04-14 11:45:25,095 WARN org.apache.hadoop.hdfs.server.common.Storage: Failed to add storage directory [DISK]file:/usr/hadoop/hadoop-2.7.3/hdfs/
data/
java.io.IOException: Incompatible clusterIDs in /usr/hadoop/hadoop-2.7.3/hdfs/data: namenode clusterID = CID-9df18536-da8b-4e32-8ced-e779a18cfc16; d
atanode clusterID = CID-9529ac9d-6a5f-4181-a995-d09c9232125e
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:775)
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.loadStorageDirectory(DataStorage.java:300)
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.loadDataStorage(DataStorage.java:416)
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.addStorageLocations(DataStorage.java:395)
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:573)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:1362)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:1327)
        at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:317)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:223)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:802)
        at java.lang.Thread.run(Thread.java:748)
2019-04-14 11:45:25,097 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to master/192.168.11.4:9000. Exiting.
java.io.IOException: All specified directories are failed to load.
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:574)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:1362)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:1327)
        at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:317)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:223)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:802)
        at java.lang.Thread.run(Thread.java:748)
2019-04-14 11:45:25,098 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Ending block pool service for: Block pool <registering> (Datanode Uuid unassigned) service to master/192.168.11.4:9000
2019-04-14 11:45:25,206 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Removed Block pool <registering> (Datanode Uuid unassigned)
2019-04-14 11:45:27,207 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Exiting Datanode
2019-04-14 11:45:27,208 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 0
2019-04-14 11:45:27,210 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

原因:

多次格式化namenode,datanode中保存的current/VERSION文件中的clustreID的值是上一次格式化保存的clusterID,使得datanode和namenode之间的ID不一致

解决方案:

方案①如果hdfs文件夹中没有重要的数据,那么删除hdfs文件夹,再重新格式化
方案②hdfs中有重要数据,在master的hdfs/name目录下找到一个current/VERSION文件,记录clusterID并复制。然后在slave的hdfs/data目录下找到一个current/VERSION文件,将其中clustreID的值替换成刚刚复制的clusterID的值

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/478163
推荐阅读
相关标签
  

闽ICP备14008679号