1. 程式人生 > >Hadoop錯誤:java.io.IOException: Incompatible clusterIDs

Hadoop錯誤:java.io.IOException: Incompatible clusterIDs

問題:

配置Hadoop叢集時,一個節點的DataNode無法啟動

 

排查:

檢視hadoop-root-datanode-bigdata114.log檔案,錯誤資訊如下:

java.io.IOException: Incompatible clusterIDs in /root/training/hadoop-2.7.3/tmp/dfs/data:

namenode clusterID = CID-947a48a2-56aa-4566-85d6-b5987d0bfeca; datanode clusterID = CID-8c75bd62-98f6-4482-85f3-865cb9a0f70f

 

解決:

開啟 /root/training/hadoop-2.7.3/tmp/dfs/data/current 下的VERSION檔案(/tmp 是在 core-site.xml 中設定的hadoop臨時目錄):

#Thu Dec 13 00:00:49 CST 2018
storageID=DS-e242ac88-5b0f-402c-b138-7e29f583ec82
clusterID=CID-8c75bd62-98f6-4482-85f3-865cb9a0f70f
cTime=0
datanodeUuid=2ddcdd2a-9f76-4e3e-8cc3-9b9d44448936
storageType=DATA_NODE


layoutVersion=-56

將clusterID修改為CID-947a48a2-56aa-4566-85d6-b5987d0bfeca 即可