gpt4 book ai didi

hadoop - 作业跟踪器未启动

转载 作者:行者123 更新时间:2023-12-02 21:41:58 24 4
gpt4 key购买 nike

我在this site的帮助下安装CDH4.6.0。我正在运行start-all.sh来启动服务。

  /etc/init.d/hadoop-hdfs-namenode start

/etc/init.d/hadoop-hdfs-datanode start

/etc/init.d/hadoop-hdfs-secondarynamenode start

/etc/init.d/hadoop-0.20-mapreduce-jobtracker start

/etc/init.d/hadoop-0.20-mapreduce-tasktracker start

bin/bash [to start bash prompt after starting services]

将这些指令作为docker文件的一部分执行后,例如
 CMD ["start-all.sh"]

它启动所有服务

当我jps时,我只能看到
 jps
Namenode
Datanode
Secondary Namenode
Tasktracker

但是作业跟踪器尚未启动。日志如下
  2015-01-23 07:26:46,706 INFO org.apache.hadoop.metrics.jvm.JvmMetrics: 
Initializing JVM Metrics with processName=JobTracker, sessionId=
2015-01-23 07:26:46,735 INFO org.apache.hadoop.mapred.JobTracker:

JobTracker up at: 8021

2015-01-23 07:26:46,735 INFO org.apache.hadoop.mapred.JobTracker:

JobTracker webserver: 50030
2015-01-23 07:26:47,725 INFO org.apache.hadoop.mapred.JobTracker:

Creating the system directory

2015-01-23 07:26:47,750 WARN org.apache.hadoop.mapred.JobTracker: Failed

to operate on mapred.system.dir (hdfs://localhost:8020/var/lib/hadoop-

hdfs/cache/mapred/mapred/system) because of permissions.

2015-01-23 07:26:47,750 WARN org.apache.hadoop.mapred.JobTracker: This

directory should be owned by the user 'mapred (auth:SIMPLE)'

2015-01-23 07:26:47,751 WARN org.apache.hadoop.mapred.JobTracker: Bailing out ...

org.apache.hadoop.security.AccessControlException: Permission denied: user=mapred, access=WRITE, inode="/":hdfs:supergroup:drwxr-xr-x

但是,当我再次从bash提示符启动它时,它可以工作。为什么这样?有什么建议么?

我可以从日志中看到它。 Job Tracker从端口8020开始,为什么要在端口8020上运行?这是个问题吗?如果是这样,如何解决呢?

最佳答案

似乎被映射的用户没有特权在HDFS根目录内写入文件/目录。

在启动mapreduce服务之前,请切换到hdfs用户并为mapred用户分配必要的特权。

sudo -su hdfs ; 

hadoop fs -chmod 777 /

/etc/init.d/hadoop-0.20-mapreduce-jobtracker stop; /etc/init.d/hadoop-0.20-mapreduce-jobtracker start

关于hadoop - 作业跟踪器未启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28105066/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com