工作跟踪器没有启动

时间:2015-01-23 07:35:52

标签: hadoop docker cloudera-cdh dockerfile

我在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提示启动时,它可以工作。为什么这样?有什么建议吗?

我可以从日志中看到它。工作跟踪器从端口8020开始,为什么它尝试在8020端口运行?这是个问题吗?如果是这样,如何解决它?

1 个答案:

答案 0 :(得分:0)

似乎mapred用户没有权限在HDFS根目录中写入文件/目录。

切换到hdfs用户并在启动mapreduce服务之前为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