Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop UI shows only one Datanode

Tags:

hadoop

I've started hadoop cluster composed of on master and 4 slave nodes.

Configuration seems ok:

hduser@ubuntu-amd64:/usr/local/hadoop$ ./bin/hdfs dfsadmin -report

When I enter NameNode UI (http://10.20.0.140:50070/) Overview card seems ok - for example total Capacity of all Nodes sumes up.

enter image description here

The problem is that in the card Datanodes I see only one datanode.

Datanode card

like image 539
Jakub Kuszneruk Avatar asked Dec 20 '22 01:12

Jakub Kuszneruk


2 Answers

I came across the same problem, fortunately, I solved it. I guess it causes by the 'localhost'.

  1. Config different name for these IP in /etc/host
  2. Remember to restart all the machines, things will go well.
like image 200
wayde Avatar answered Dec 21 '22 15:12

wayde


It's because of the same hostname in both datanodes. In your case both datanodes are registering to the namenode with same hostname ie 'localhost' Try with different hostnames it will fix your problem.

in UI it will show only one entry for a hostname.

in "hdfs dfsadmin -report" output you can see both.

like image 34
Rahul Avatar answered Dec 21 '22 13:12

Rahul