Support Questions
Find answers, ask questions, and share your expertise

connection refused error when execute command "./hadoop fs -ls /hbase"

Explorer

[line1@rhpot21d bin]$ ./hadoop fs -ls /hbase
ls: Call From rhpot21d.ega.ae/10.7.1.91 to rhpot21d.ega.ae:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

14 REPLIES 14

New Contributor

You might need some additional info to troubleshoot this.

 

1.  Are you using kerberos?

2.  Check logs for more detail.  

      On Hbase master and regionserver nodes, check /var/log/hbase for log files:

      Should look sort of like hbase-cmf-hbase-MASTER-<hostname>.log.out  and  hbase-cmf-hbase-REGIONSERVER-<hostname>.log.out

3.  Post any ERRORs and stacktraces here for review

Champion
Is this the correct address to your NN, rhpot21d.ega.ae? Is the NN process running on it and listening on port 8020?

Any errors/exceptions in the NN logs?

Explorer

Hi

 

There is no process running at the port 8020 and the host name is rhpot21d.ega.ae

Which service starts the process at the port 8020?

 

where I can see NN logs?

 

Thanks,

 

 

 

 

 

 

Champion
The Namenode runs on port 8020 by default. It contains the full metadata for all files and blocks on the cluster. That is why you are getting this error as it is not running, or at least not running on the host you are trying to access it on.

By default the NN logs are in /var/log/hadoop-hdfs/ on the node the process is running on.

Are you using CM?

Explorer

Thanks for your reply.......

 

which process is starting namenode listening at port 8020?

How to start the above process?

 

I have started all services inspite of that NN is not started..

 

I am using CM for restarting the services...

 

Awaiting for your reply

 

 

Explorer

Hi

 

Please find NN logs:

 

2017-02-19 10:34:57,359 INFO org.apache.hadoop.ipc.Server: IPC Server handler 23 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.mkdirs from 10.7.1.91:44129 Call#34 Retry#0: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /tmp/.cloudera_health_monitoring_canary_files. Name node is in safe mode.
The reported blocks 0 has reached the threshold 0.9990 of total blocks 0.

The number of live datanodes 0 needs an additional 1 live datanodes to reach the minimum number 1.
Safe mode will be turned off automatically once the thresholds have been reached.

 

Appreciate your reply...

Champion
Ok, you NN is now running and no errors. It is in safemode as there are no Datanodes. Start up your Datanodes and lets see what we have.

Explorer

Looks like NN is not running and listening at port 8020....

 

Please see the logs...

 

2017-02-19 10:56:26,964 INFO org.apache.hadoop.ipc.Server: IPC Server handler 8 on 8022, call org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol.rollEditLog from 10.7.1.91:46649 Call#67 Retry#0
org.apache.hadoop.hdfs.server.namenode.SafeModeException: Log not rolled. Name node is in safe mode.
The reported blocks 0 has reached the threshold 0.9990 of total blocks 0. The number of live datanodes 0 needs an additional 1 live datanodes to reach the minimum number 1.
Safe mode will be turned off automatically once the thresholds have been reached.
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkNameNodeSafeMode(FSNamesystem.java:1463)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.rollEditLog(FSNamesystem.java:6493)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.rollEditLog(NameNodeRpcServer.java:1009)
        at org.apache.hadoop.hdfs.protocolPB.NamenodeProtocolServerSideTranslatorPB.rollEditLog(NamenodeProtocolServerSideTranslatorPB.java:142)

Champion
This particular error is that it failed to roll the edit logs from this server, 10.7.1.91. This should be the Secondary Namenode. Is this process running on that host?

Both log entries you posted still report that there are 0 live Datanodes. Something is wrong there as well.