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.
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.
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.
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.
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.
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.
Try using below command
hdfs namenode -format -clusterId
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With