Reputation: 1098
i have configured hadoop on two machine. i can access both machine without password using ssh.i have successfully formatted namenode using following command:--
bin/hadoop namenode -format
then i tried to run pi example which shipped with hadoop.tar
sandip@master:~/hadoop-1.0.4$ bin/hadoop jar hadoop-examples-1.0.4.jar pi 5 500
Number of Maps = 5
Samples per Map = 500
13/04/14 04:13:04 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 0 time(s).
13/04/14 04:13:05 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 1 time(s).
13/04/14 04:13:06 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 2 time(s).
13/04/14 04:13:07 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 3 time(s).
13/04/14 04:13:08 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 4 time(s).
13/04/14 04:13:09 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 5 time(s).
13/04/14 04:13:10 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 6 time(s).
13/04/14 04:13:11 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 7 time(s).
13/04/14 04:13:12 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 8 time(s).
13/04/14 04:13:13 INFO ipc.Client: Retrying connect to server:
master/192.168.188.131:9000. Already tried 9 time(s).
java.lang.RuntimeException: java.net.ConnectException: Call to
master/192.168.188.131:9000 failed on connection exception: java.net.ConnectException:
Connection refused
at org.apache.hadoop.mapred.JobConf.getWorkingDirectory(JobConf.java:546)
at org.apache.hadoop.mapred.FileInputFormat.setInputPaths(FileInputFormat.java:318)
at org.apache.hadoop.examples.PiEstimator.estimate(PiEstimator.java:265)
at org.apache.hadoop.examples.PiEstimator.run(PiEstimator.java:342)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
Upvotes: 1
Views: 1416
Reputation: 1098
ooh M G i forgot to start hadoop cluster. I Fixed it by running this command:-
bin/start-all.sh
Upvotes: 1
Reputation: 2337
It says : Connection refused . By seeing log I can say that while starting the cluster, your machine is not able to connect to namenode.
Check following things: - Name node address is correct ( you give it using default.fs.name in core-site.xml) - Check if you have specified task tracker's address correct in mapred-site.xml - Check if you have specified the hadoop.tmp.dir property in core-site.xml. And this directory exists on your machine after formatting.
-After formatting just verify one more thing is VERSION file should contain the same name space ids in master and slave nodes.
Upvotes: 0