hadoopdockerdockerfilecloudera

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.


Solution

  • 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.