代码改变世界

Failed to start NodeManager caused by "/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK: Permission denied"

  Ivan的一亩三分地  阅读(2189)  评论(0编辑  收藏  举报
 
1
2
3
4
5
6
Hadoop 安装步骤:
0. 安装前准备(节点机器,环境设置,yum源设置)
1. 配置并安装Cloudera-Manager
2. 启动 CM 服务
3. 安装CDH,并配置集群
4. 启动

在启动Yarn时, NodeManager 启动失败。接下来查看对应的日志:Cloudera Manager 主页,点击YARN项操作,选择“实例”,点击角色类型,进入NodeManager 主页,在日志文件下拉框有stdout,stderr,角色日志文件,建议查看角色日志文件。

 下面是角色日志文件的输出内容

  

通过网络查看不只人遇到过这样的问题

login the related node server, check the permission and ownership of those directories  /var/lib/hadoop-*,  I got the following info

1
2
3
4
5
6
[root@elephant lib]# ls -l | grep -i hadoop
d---------. 2 root         root            6 Nov 25 05:27 hadoop-hdfs
d---------. 2 root         root            6 Nov 25 05:27 hadoop-httpfs
d---------. 2 root         root            6 Nov 25 05:27 hadoop-kms
d---------. 2 root         root            6 Nov 25 05:27 hadoop-mapreduce
d---------. 3 root         root           29 Nov 25 06:44 hadoop-yarn

  

they are not right. so we need to do the following steps to fix it

1
2
3
4
5
6
7
chown  -R hdfs:hdfs /var/lib/hadoop-hdfs
chown  -R httpfs.httpfs /var/lib/hadoop-httpfs
chown  -R kms.kms /var/lib/hadoop-kms
chown  -R mapred:mapred /var/lib/hadoop-mapreduce
chown  -R yarn:yarn /var/lib/hadoop-yarn
 
chmod -R 755 /var/lib/hadoop-*

  

then try to start the node manager, it succeed.

Cheers!!!

 

点击右上角即可分享
微信分享提示