I am new to Hadoop and I was trying to install Single node standalone Hadoop in Ubuntu 14.04. I was following the Apache Hadoop Document and as it is given there, when I tried to run
$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar grep input output 'dfs[a-z.]+'
I got the java.net.ConnectException
message:
Call From a1409User/127.0.0.1 to localhost:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
I checked in http://wiki.apache.org/hadoop/ConnectionRefused where it has been asked to verify that there isn't an entry for hostname mapped to 127.0.0.1 or 127.0.1.1 in /etc/hosts. Though this point is not so clear to me, I tried by changing the given IP and mentioning the port number but no luck. I also checked with telnet:
$ telnet localhost 9000
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Please help me to solve the issue.
Try to format namenode. Also in your script input
and output
directories must be given. For example:
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.0.jar grep /user/hadoop/hadoop-config /user/hadoop/output 'dfs[a-z.]+'
After that you can check the content in the output directory by:
hdfs dfs -ls /user/hadoop/output/
It should print output as follows:
Found 2 items -rw-r--r-- 3 hadoop supergroup 0 2014-09-05 07:55 /user/hadoop/output/_SUCCESS -rw-r--r-- 3 hadoop supergroup 179 2014-09-05 07:55 /user/hadoop/output/part-r-00000
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments