CDH遇到的坑

启动datanode报错,由于该主机之前安装过CDH,需要清空原有的datanode配置

Failed to add storage directory [DISK]file:/dfs/dn
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /dfs/dn is in an inconsistent state: Can't format the storage directory because the current directory is not empty.
Failed to add storage directory [DISK]file:/dfs/dn
java.io.IOException: Incompatible clusterIDs in /dfs/dn: namenode clusterID = cluster21; datanode clusterID = CID-54b19dfb-b3f7-4b8a-99a5-5ddf05609de6

在之前安装过agent的主机上重新运行主机,需要清空原有cm_guid数据,再重启agent
rm -rf /var/lib/cloudera-scm-agent/cm_guid
systemctl restart cloudera-scm-agent

ERROR   76996 MainThread agent  
Error, CM server guid updated, expected d46c4974-5ff0-43cb-ad6f-0d47e08b15b9, received 2a81f36e-f78a-4aac-9000-ae6e93324c7a

你可能感兴趣的:(CDH遇到的坑)