Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datanode is not starting: incompatible clusterID Hadoop

Tags:

hadoop

bigdata

Trying to start hadoop 2.7.3 services datanode is not starting:

java.io.IOException: Incompatible clusterIDs in /opt/hadoop/tmp/dfs/data: namenode clusterID = CID-4808098e-de31-469d-9761-9a4558fdaf70; datanode clusterID = CID-492135f3-fc08-46f1-a574-878855ae865e

I already copied namenode clusterId onto datanode in tmp folder and reformat namenode. Also, I removed tmp folder, reformat and start again.

The only way to start it is deleting manually tmp foder everytime I want to start again.

like image 840
epic_last_song Avatar asked Nov 05 '16 12:11

epic_last_song


People also ask

How do I manually start my Datanode?

Datanode daemon should be started manually using $HADOOP_HOME/bin/hadoop-daemon.sh script. Master (NameNode) should correspondingly join the cluster after automatically contacted. New node should be added to the configuration/slaves file in the master server. New node will be identified by script-based commands.

What happens when Datanode is down?

If Namenode gets down then the whole Hadoop cluster is inaccessible and considered dead. Datanode stores actual data and works as instructed by Namenode. A Hadoop file system can have multiple data nodes but only one active Namenode.

Where is DFS Datanode dir?

datanode. data. dir can be any directory which is available on the datanode. It can be a directory where disk partitions are mounted like '/u01/hadoop/data, /u02/hadoop/data' which is in case if you have multiple disks partitions to be used for hdfs purpose.

What is hadoop cluster ID?

Your hadoop cluster ID will be in this file /hadoop/hdfs/namenode/current/VERSION . Open the VERSION file in text editor and search for namespaceID . The namespaceID in the VERSION file is your hadoop cluster ID. You can also find your namespaceID in /hadoop/hdfs/namesecondary/current/VERSION file.


2 Answers

You must be formatting namenode everytime when you are starting service. Namenode should be formatted only once. The solution is to delete the temp folder, then format the namenode and start the service. Next time whenever you are starting the service don't format the namenode bcz this step has to be performed only one time.

like image 180
Mahek Avatar answered Sep 21 '22 16:09

Mahek


Try using below command

hdfs namenode -format -clusterId

like image 24
BruceWayne Avatar answered Sep 20 '22 16:09

BruceWayne