没有在amazonec2上运行的hadoop示例

toiithl6  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(369)

我在amazonec2上使用hadoop-1.0.4,有3个ubuntu12.10示例,1个主示例和2个从示例,就在~目录下。现在start-all.sh和stop-all.sh是可以的,但是当我在master或slaves上运行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)

不过,我已经chmod777-rtmp到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来运行示例吗?谢谢。

sy5wg1nm

sy5wg1nm1#

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

相关问题