Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Connection refused" Error for Namenode-HDFS (Hadoop Issue)

Tags:

hadoop

hdfs

All my nodes are up and running when we see using jps command, but still I am unable to connect to hdfs filesystem. Whenever I click on Browse the filesystem on the Hadoop Namenode localhost:8020 page, the error which i get is Connection Refused. Also I have tried formatting and restarting the namenode but still the error persist. Can anyone please help me solving this issue.

like image 845
Shivam Panicker Avatar asked Mar 26 '13 06:03

Shivam Panicker


People also ask

What if NameNode fails in HDFS?

If the active namenode fails, a standby can take over very quickly because it has the latest state of metadata. zookeeper helps in switching between the active and the standby namenodes. The namenode maintains the reference to every file and block in the memory.

Which one of the failure causes Hdfs failure?

The primary objective of HDFS is to store data reliably even in the presence of failures. The three common types of failures are NameNode failures, DataNode failures and network partitions.

What is Hdfs NameNode?

The NameNode is the centerpiece of an HDFS file system. It keeps the directory tree of all files in the file system, and tracks where across the cluster the file data is kept. It does not store the data of these files itself.


1 Answers

Check whether all your services are running JobTracker, Jps, NameNode. DataNode, TaskTracker by running jps command.

Try to run start them one by one:

./bin/stop-all.sh
./bin/hadoop-daemon.sh start namenode
./bin/hadoop-daemon.sh start jobtracker
./bin/hadoop-daemon.sh start tasktracker
./bin/hadoop-daemon.sh start datanode

If you're still getting the error, stop them again and clean your temp storage directory. The directory details are in the config file ./conf/core-site.xml and the run,

./bin/stop-all.sh
rm -rf /tmp/hadoop*
./bin/hadoop namenode -format

Check the logs in the ./logs folder.

tail -200 hadoop*jobtracker*.log
tail -200 hadoop*namenode*.log
tail -200 hadoop*datanode*.log

Hope it helps.

like image 61
devsathish Avatar answered Sep 18 '22 17:09

devsathish