0

When I try to run hadoop command

vinit@ubuntu:~/hadoop-1.0.4$ bin/hadoop dfs -ls

I get following things as output.

13/04/17 06:26:37 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9010. Already tried 0 time(s). 13/04/17 06:26:38 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9010. Already tried 1 time(s). Bad connection to FS. command aborted. exception: Call to localhost/127.0.0.1:9010 failed on connection exception: java.net.ConnectException: Connection refused

I am new to hadoop and even Java.Please Help!

4

2 回答 2

0

Check if your HDFS processes are running? Run 'jps' command to check the running java processes.

You shoudl have at least 'Namenode' and 'Datanode' processes running. Please check and let me know.

Cheers Rags

于 2013-04-17T11:57:32.883 回答
0

I have struggled two days and the night between to find out the answer to this problem.

In my case( and I'm sure this is the problem in most cases ) had to create the hadoop temporary folder by hand and add them to the hdfs-site.xml !

<property>

<name>dfs.data.dir</name>

<value>/home/stefan/Downloads/hadoop-2.7.1/tmp/dfs/name/data</value>

<final>true</final> 

</property> 

<property> 

<name>dfs.name.dir</name>

<value>/home/stefan/Downloads/hadoop-2.7.1/tmp/dfs/name</value> 

<final>true</final> 

</property>

I hope this helps you guys not to go through the same hell as me.

Besides that

chown user_name hadoop_folder hadoop_temp_folder
chmod 755 hadoop_folder hadoop_temp_folder
于 2015-08-18T05:47:02.883 回答