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?
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.
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]
Thanks for the response this did not work for me unfortunately. This is what I tried. 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.