I am trying to install Hadoop 3.1.0 into two virtual machines:
The first machine contains one name node and one data node, the second contains one data node.
I followed this article Install Hadoop 3.0.0 multi-node cluster on Ubuntu. And every goes fine until i executed the start-dfs.sh and start-yarn.sh commands.
When i run the Jps
command on Name node it shows the following results:
16488 NameNode
16622 DataNode
17215 NodeManager
17087 ResourceManager
17530 Jps
16829 SecondaryNameNode
And when I run it on the Data node it shows:
2306 DataNode
2479 NodeManager
2581 Jps
But the weird thing is that when executing hdfs dfsadmin -report
command it only shows Live datanodes (1)
which is the local datanode.
I made a lot of searches; I didn't find anything useful.
I tried to:
stop-all.sh
hdfs namenode -format
commandThere is a similar question here: Hadoop UI shows only one Datanode In which they suggested to change the hosts name. In my Namenode /etc/hosts
file contains the following lines:
127.0.0.1 localhost
127.0.1.1 hadoop-Namenode
192.168.75.131 hadoop-Namenode
192.168.75.132 hadoop-datanode-1
And in the Datanode /etc/hosts
i have:
127.0.0.1 localhost
127.0.1.1 hadoop-datanode-1
192.168.75.131 hadoop-Namenode
192.168.75.132 hadoop-datanode-1
Any suggestions?
The issue was solved by removing 127.0.1.1
lines from both machines
127.0.1.1 hadoop-Namenode
127.0.1.1 hadoop-datanode-1
These lines was causing a conflict when trying to resolve the host name.