Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call From quickstart.cloudera/172.17.0.2 to quickstart.cloudera:8020 failed on connection exception: java.net.ConnectException: Connection refused

I am very new to Docker and Hadoop system. I have installed the Docker in Ubuntu 16.04 and run the Hadoop image from Cloudera inside a new Docker container. But when I try to run any command in hdfs the error message is shown as:

Call From quickstart.cloudera/172.17.0.2 to quickstart.cloudera:8020 failed on connection exception: java.net.ConnectException: Connection refused;

I could not figure out how to solve this. I expect for kind help.

like image 669
gd1 Avatar asked Feb 10 '17 03:02

gd1


2 Answers

Port 8020 is for the hdfs-namenode service, so my guess is that service not started or has failed.

Can you try to restart it?

command: sudo  service hadoop-hdfs-namenode restart

You can also check the status of the namenode service.

Command: sudo  service hadoop-hdfs-namenode status

Also, check the hadoop-hdfs-datanode service as it may also need to be restarted.

command: sudo  service hadoop-hdfs-datanode restart

If you still get the error then check the NameNode logs in /var/log/hadoop-hdfs and add it to your question for further analysis.

like image 195
ravi Avatar answered Oct 12 '22 06:10

ravi


In my case, restarting namenode, datanode, and yarn resource manager worked.

sudo service hadoop-yarn-resourcemanager restart
sudo  service hadoop-hdfs-namenode restart
sudo service hadoop-hdfs-datanode restart
like image 4
Ankit C Avatar answered Oct 12 '22 06:10

Ankit C