0

我安装了 HDFS 并在 3 台计算机上工作。然后我尝试向现有集群添加 5 台以上的 PC,但这样做之后。当我尝试在主节点上启动 hadoop 时,我收到了下面提到的这个错误。

[hduser@dellnode1 ~]$ start-all.sh
starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-namenode-dellnode1.pictlibrary.out
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/local/hadoop/bin/../logs/hadoop-hduser-namenode-dellnode1.pictlibrary.log (Permission denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
dellnode3.pictlibrary: datanode running as process 4856. Stop it first.
dellnode1.pictlibrary: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-datanode-dellnode1.pictlibrary.out
dellnode2.pictlibrary: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-datanode-dellnode2.pictlibrary.out
dellnode1.pictlibrary: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-secondarynamenode-dellnode1.pictlibrary.out
starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-jobtracker-dellnode1.pictlibrary.out
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /usr/local/hadoop/bin/../logs/hadoop-hduser-jobtracker-dellnode1.pictlibrary.log (Permission denied)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:216)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
dellnode3.pictlibrary: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-tasktracker-dellnode3.pictlibrary.out
dellnode1.pictlibrary: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-tasktracker-dellnode1.pictlibrary.out
dellnode2.pictlibrary: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-hduser-tasktracker-dellnode2.pictlibrary.out

所有电脑都运行 Fedora 17

4

1 回答 1

1

我会用类似的东西手动创建日志文件

sudo touch  /usr/local/hadoop/bin/logs/hadoop-hduser-namenode-dellnode1.pictlibrary.log

如果你的路径是

/usr/local/hadoop/bin/../logs/hadoop-hduser-namenode-dellnode1.pictlibrary.log

正如我在第一行中写的那样更好地修复。

然后更改文件的权限:

sudo chmod 750 /usr/local/hadoop/bin/logs/hadoop-hduser-namenode-dellnode1.pictlibrary.log

然后再试一次。这次应该可以工作了;-)

于 2013-02-13T20:39:47.457 回答