我在3个ubuntu 12.10实例,1个主服务器和2个服务器的amazon ec2上使用hadoop-1.0.4,就在〜目录下。 现在start-all.sh和stop-all.sh没问题,但是当我在master或slave上运行jps时,它什么都不打印。然后我测试了hadoop示例:
~/hadoop$ bin/hadoop jar hadoop-examples-1.0.4.jar pi 10 10000
显示
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)
但是我已经chmod 777 -R tmp到tmp文件夹了。
~/hadoop$ sudo bin/hadoop jar hadoop-examples-1.0.4.jar pi 10 10000
使用sudo,它会产生
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).
然后无法连接。那么问题是什么?我应该把sudo运行这些例子吗?非常感谢。
答案 0 :(得分:0)
我认为,问题是,54.235.101.85被认为是一个公共IP地址。在所有节点中使用ifconfig
获取IP地址列表,并检查以10.x.x.x / 172.x.x.x / 192.x.x.x开头的IP。如果找到,请相应地修改所有节点中的配置文件。