I have set up a multi node Hadoop Cluster. The NameNode and Secondary namenode runs on the same machine and the cluster has only one Datanode. All the nodes are configured o
I have face same issue in my single node cluster.
I have done below steps in order to resolve this issue:
1. Checked datanode log under logs directory and found that namenode clusterId and datanode clusterId are different.
2. Make empty datanode directory:
rm -rvf /hadoop/hdfs/datanode/*
3. stop-all.sh
4. hdfs namenode -format
5. start-all.sh
6. jps
27200 NodeManager
26129 NameNode
26595 SecondaryNameNode
5539 GradleDaemon
2355 Main
2693 GradleDaemon
27389 Jps
26846 ResourceManager
26334 DataNode
This works for me.
@Learner,
I had this problem of datanodes not shown in the Namenode's web UI. Solved it by these steps in Hadoop 2.4.1.
do this for all the nodes (master and slaves)
1. remove all temporary files ( by default in /tmp) - sudo rm -R /tmp/*
.
2. Now try connecting to all nodes through ssh
by using ssh username@host
and add keys in your master using ssh-copy-id -i ~/.ssh/id_rsa.pub username@host
to give unrestricted access of slaves to the master (not doing so might be the problem for refusing connections).
3. Format the namenode using hadoop namenode -format
and try restarting the daemons.