0

I am using hadoop-1.0.4 on amazon ec2 of 3 ubuntu 12.10 instances, 1 master and 2 slaves, just under ~ directory. Now start-all.sh and stop-all.sh is ok, but when i run jps on master or slaves, it prints nothing. Then i tested hadoop examples:

~/hadoop$ bin/hadoop jar hadoop-examples-1.0.4.jar pi 10 10000  

It shows

    Exception in thread "main" java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createTempFile(File.java:1879)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:115)

However i've chmod 777 -R tmp to tmp folders.

~/hadoop$ sudo bin/hadoop jar hadoop-examples-1.0.4.jar pi 10 10000  

With sudo, it produces

    13/05/12 03:58:11 WARN conf.Configuration: DEPRECATED: hadoop-site.xml
     found in the classpath. Usage of hadoop-site.xml is deprecated.  
    Instead use core-site.xml, mapred-site.xml and hdfs-site.xml to  
    override properties of core-default.xml, mapred-default.xml  
    and hdfs-default.xml respectively
    Number of Maps  = 10
    Samples per Map = 10000
    13/05/12 03:58:12 WARN fs.FileSystem: "54.235.101.85:50001" is a deprecated   
    filesystem name. Use "hdfs://54.235.101.85:50001/" instead.
    13/05/12 03:58:13 INFO ipc.Client: Retrying connect to server: 
    hdmaster/54.235.101.85:50001. Already tried 0 time(s).
    13/05/12 03:58:14 INFO ipc.Client: Retrying connect to server: 
    hdmaster/54.235.101.85:50001. Already tried 1 time(s).
    13/05/12 03:58:15 INFO ipc.Client: Retrying connect to server: 
    hdmaster/54.235.101.85:50001. Already tried 2 time(s).

Then failed to connect. So what is the problem? should i put sudo to run the examples? Thanks a lot.

user1261718
  • 37
  • 1
  • 6
  • is 54.235.101.85 accessible? – SSaikia_JtheRocker May 13 '13 at 14:39
  • @JtheRocker Now sudo is not needed anymore, i fixed some misspelled port numbers, the problem is still java.net.BindException: Problem binding to hdmaster/54.235.101.85:50000 : Cannot assign requested address. I just removed files in /tmp from master and there's jps and secondarynamenode respond to jps, still no namenode and datanode. – user1261718 May 13 '13 at 16:59
  • Have you tried disabling firewall? – SSaikia_JtheRocker May 13 '13 at 17:19
  • Check if you have the problem similar to this: http://stackoverflow.com/questions/10663839/namenode-java-net-bindexception – SSaikia_JtheRocker May 13 '13 at 17:24
  • @JtheRocker I'm using amazon EC2 instances, allowing ports 22,50000,50001,50030,50060,50070. I checked that, there is no problem with my /etc/hosts and there is no localhost. netstat -nl shows unrelated ports. The main problem is guess is the namenode can not be initialized. – user1261718 May 13 '13 at 18:18
  • Nope, allowing only those ports won't work. You should try disabling your firewall to make sure no ports get blocked. If I'm not wrong, task trackers connect to different random ports. Have you formatted the Namenode? Check my answer below. – SSaikia_JtheRocker May 13 '13 at 18:28
  • @JtheRocker dunno wut's ubuntu's default firewall... – user1261718 May 13 '13 at 21:59

1 Answers1

0

I think, the problem is, 54.235.101.85 is suppose to be a public IP address. Use ifconfig in all the nodes to get a list of IP address and check for IP beginning with 10.x.x.x/172.x.x.x/192.x.x.x. If you find any, modify your configuration files in all the nodes accordingly.

SSaikia_JtheRocker
  • 5,053
  • 1
  • 22
  • 41