在多节点集群中运行hadoop不起作用

pdkcd3nj  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(339)

我安装了一个hdfs并在3台计算机上工作。然后我尝试向现有集群中添加5台以上的计算机,但在这样做之后。当我尝试在主节点上启动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

iszxjhcz

iszxjhcz1#

我会手动创建日志文件

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

再试一次。这次应该有用;-)

相关问题