- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Not able to access HDFS, getting Connection exception.
- Labels:
-
Apache Hadoop
-
HDFS
Created on ‎06-08-2015 02:59 PM - edited ‎09-16-2022 02:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I started the Cloudera VM normally, But when I am doing a list on the files in HDFS, I am getting a Connection Exception as follows:
[cloudera@quickstart ~]$ hadoop fs -ls /user/
ls: Call From quickstart.cloudera/127.0.0.1 to quickstart.cloudera:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
I guess it is because of the Hadoop services not running but can somebody please suggest, when i am starting the CLoudera VM as required why getting this error?
Created ‎06-08-2015 03:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All the basic Hadoop services should be running when you start the VM. Port 8020 is for the hadoop-hdfs-namenode service, so my guess is that service has failed and just needs to be restarted.
You can check the status of a service with
service <service-name> status
and you can restart a service with
service <service-name> restart
So 'service hadoop-hdfs-namenode restart' may be all you need. Also check the hadoop-hdfs-datanode service as it may also need to be restarted.
The services should have been running, so if they're not it means something went wrong. If you're curious or if you continue to have a problem, have a look at the NameNode logs in /var/log/hadoop-hdfs for anything that looks like a fatal error and post it back here.
Created ‎06-08-2015 03:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My datanode service is running fine but yes the namenode servoce is not running.
I restarted it but the restart is getting failed:
[root@quickstart cloudera]# service hadoop-hdfs-datanode status
Hadoop datanode is running [ OK ]
[root@quickstart cloudera]# service hadoop-hdfs-namenode restart
no namenode to stop
Stopped Hadoop namenode: [ OK ]
starting namenode, logging to /var/log/hadoop-hdfs/hadoop-hdfs-namenode-quickstart.cloudera.out
Failed to start Hadoop namenode. Return value: 1 [FAILED]
Please advice.
Created ‎09-23-2016 08:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am facing the same issue. Please help me if u have found some soution to this. Please help
Created ‎02-09-2017 01:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
did you resolve the issue I am facing the same issue when trying to execute a command even after starting the service and having the status say okay.
Created ‎02-09-2017 11:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First please see the status of service using this command
sudo service hadoop-hdfs-<service_name> status;
ex- sudo service hadoop-hdfs-namenode status;
If status is stop , please try to start using below command
sudo service hadoop-hdfs-<service_name> start;
If it's running , first stop it and again restart this.
sudo service hadoop-hdfs-<service_name> stop;
sudo service hadoop-hdfs-<service_name> restart;
Hope it will work for you.
Created ‎02-10-2017 06:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First I checked the status it was not running then I started the service with
sudo service hadoop-hdfs-datanode start
Then tried hadoop fs -ls /
This gave me the same error as before. Do I need to also start a namenode or something but Im thinking I shouldnt because I am not in control of namenodes and on other coworkers computers it just works. Any suggestions are appreciated.
Created ‎02-11-2017 03:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please see these below link, i hope it will help you.
https://www.cloudera.com/documentation/enterprise/5-6-x/topics/cm_mc_start_stop_service.html
Created ‎02-13-2017 02:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created on ‎02-13-2017 07:45 PM - edited ‎02-13-2017 07:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: 0.0.0.0/0.0.0.0:8022
From the above error it is clear that the external datanode is having trouble connecting to Namenode.
You can do one thing.
Check the status of the namenode you are connect by
Sudo Service hadoop-hdfs-namenode status
Sudo Service hadoop-hdfs-secondarynamenode status
if it has not started then you may start it by replacing the status with start if you dont have authorization you should contact the hadoop admin . Also please check the same for Secondarynamenode.
Thanks
