0

我在 3 个 ubuntu 12.10 实例、1 个主服务器和 2 个从属服务器的亚马逊 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 来运行示例吗?非常感谢。

4

1 回答 1

0

我认为,问题是,54.235.101.85 应该是公共 IP 地址。在所有节点中使用ifconfig以获取 IP 地址列表并检查以 10.xxx/172.xxx/192.xxx 开头的 IP 如果找到,请相应地修改所有节点中的配置文件。

于 2013-05-13T18:24:37.223 回答