In the process of starting Hadoop distributed deployment, we found that Datanode did not start properly, and looked at the log to find the error:
Java.io.IOException:Incompatible clusterids In/opt/hadoop-2.5/dfs/data:namenode Clusterid = cid-adf01a94-ae34-4313-acf9-3781a425de66; Datanode Clusterid = cid-e00fcbab-47c2-4e73-8a4b-c8754dc9960e
The reason is because Datanode's Clusterid and Namenode's Clusterid mismatch: After the first format of DFS, Hadoop was started and used, and then the Format command (HDFs Namenode-format) was re-executed. At this point the clusterid of Namenode is regenerated, and Datanode's clusterid remains unchanged.
Solution: Enter the/opt/hadoop-2.5/dfs/name/current/directory, edit the version text file,
After you restart DFS, change the value of Clusterid cid-adf01a94-ae34-4313-acf9-3781a425de66 to cid-e00fcbab-47c2-4e73-8a4b-c8754dc9960e The Datanode node returns to normal.
Hadoop Datanode failed to start error