The distributed system datanode fails to start and reports java.io.IOException: All specified directories are failed to load.

--java.io.IOException: All specified directories are failed to load.   概要


2018-04-18 01:52:54,822 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 50020: starting
2018-04-18 01:52:55,289 INFO org.apache.hadoop.hdfs.server.common.Storage: Lock on /opt/hadoop-2.7.2/current/data/in_use.lock acquired by nodename 1969@s201
2018-04-18 01:52:55,291 WARN org.apache.hadoop.hdfs.server.common.Storage: java.io.IOException: Incompatible clusterIDs in /opt/hadoop-2.7.2/current/data: namenode clusterID = CID-ca8a6a9a-7f14-4c71-9b17-299e0b500fd2; datanode clusterID = CID-45f6a315-e3c8-455e-b974-167e80bf7b65
2018-04-18 01:52:55,292 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to s200/192.168.30.200:9000. Exiting. 
java.io.IOException: All specified directories are failed to load.
at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:478)
at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:1358)
at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:1323)
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)
2018-04-18 01:52:55,296 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Ending block pool service for: Block pool <registering> (Datanode Uuid unassigned) service to s200/192.168.30.200:9000
2018-04-18 01:52:55,301 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Removed Block pool <registering> (Datanode Uuid unassigned)
2018-04-18 01:52:57,302 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Exiting Datanode
2018-04-18 01:52:57,303 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 0

2018-04-18 01:52:57,304 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG: 

===================Solution
================================================================================================================================================================================================================================= According to the log, it is caused by the mismatch between the clusterID of the datanode and the clusterID of the namenode. The solution is to find the current/dfs/name/VERSION of the namenode (the paths may be different),
then find the clusterID, and then copy the ID to your cluster datanode. The clusterID in the VERSION file makes the two consistent, restart the cluster and it will be fine


[root@s200 /opt/hadoop-2.7.2/current/dfs/name/current]# cat VERSION 
#Wed Apr 18 01:52 :01 CST 2018
namespaceID=1328374604
clusterID=CID-ca8a6a9a-7f14-4c71-9b17-299e0b500fd2
cTime=0
storageType=NAME_NODE
blockpoolID=BP- 1950255321-192.168.30.200-1523987521318
layout
2.7.2/current/dfs/name/current]# 

Guess you like

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