Initialization failed for Block pool <registering> (Datanode Uuid unassigned)

Mona Jalal picture Mona Jalal · Nov 29, 2015 · Viewed 17.5k times · Source

What is the source of this error and how could it be fixed?

2015-11-29 19:40:04,670 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to anmol-vm1-new/10.0.1.190:8020. Exiting.
java.io.IOException: All specified directories are not accessible or do not exist.
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:217)
        at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:254)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:974)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:945)
        at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:278)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:220)
        at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:816)
        at java.lang.Thread.run(Thread.java:745)
2015-11-29 19:40:04,670 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Ending block pool service for: Block pool <registering> (Datanode Uuid unassigned) service to anmol-vm1-new/10.0.1.190:8020
2015-11-29 19:40:04,771 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Removed Block pool <registering> (Datanode Uuid unassigned)

Answer

Muhammad Soliman picture Muhammad Soliman · Apr 5, 2016

there are 2 Possible Solutions to resolve

First:

Your namenode and datanode cluster ID does not match, make sure to make them the same.

In name node, change ur cluster id in the file located in:

$ nano HADOOP_FILE_SYSTEM/namenode/current/VERSION 

In data node you cluster id is stored in the file:

$ nano HADOOP_FILE_SYSTEM/datanode/current/VERSION

Second:

Format the namenode at all:

Hadoop 1.x: $ hadoop namenode -format

Hadoop 2.x: $ hdfs namenode -format