啓動namenode時報如下錯誤:java
FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to hadoop09-linux/192.168.3.40:8020. Exiting. node
java.io.IOException: Incompatible clusterIDs in /opt/modules/hadoop-2.5.0/data/tmp/dfs/data: namenode clusterID = CID-1d0bc295-ef75-479e-98df-f6b2f51eb4bf; datanode clusterID = CID-08c24683-8fa9-48c3-a20c-61147b790a5blinux
緣由:namenode 的 clusterIDs 和 datanode的不同apache
解決方法:cd ${HADOOP_HOME}/data/tmp/dfs/name/current,查看VERSION文件裏的clusterID=CID-1d0bc295-ef75-479e-98df-f6b2f51eb4bf 覆蓋掉datanode的oop
${HADOOP_HOME}/data/tmp/dfs/data/current/VERSION裏的clusterIDui