Hadoop Datanodes cannot find NameNode Hadoop Datanodes cannot find NameNode hadoop hadoop

Hadoop Datanodes cannot find NameNode


I found it! By commenting out the second line of the /etc/hosts file (the one with the 127.0.1.1 entry), netstat shows the NameNode ports binding to the 192.168.1.10 address instead of the local one, and the slave VMs found it. Ahhhhhhhh. Mystery solved! Thanks for everyone's help.


This solution worked for me. i.e make sure that the name you used in property in core-site.xml and mapred-site.xml :

<property>   <name>fs.default.name</name>   <value>hdfs://master:54310</value>   <final>true</final> </property>

i.e. master is defined in /etc/hosts as xyz.xyz.xyz.xyz master on BOTH master and slave nodes.Then restart the namenode and check usingnetstat -tuplenand to see that it is bound to the "external" IP address

tcp        0      xyz.xyz.xyz.xyz:54310         0.0.0.0:*                   LISTEN      102        107203     - 

and NOT local IP 192.168.x.y or 127.0.x.y


I had the same trouble. @Magsol solution worked but it should be noted that the entry that needs to be commented out is

127.0.1.1 masterxyz

on the master machine, not the 127.0.1.1 on the slave, though I did that too. Also you need to stop-all.sh and start-all.sh for hadoop, probably obvious.

Once you have restarted hadoop check the nodemaster here: http://masterxyz:50030/jobtracker.jsp

and look at the number of nodes available for jobs.