Failed to start NodeManager caused by "/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK: Permission denied"
2017-11-26 08:40 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,角色日志文件,建议查看角色日志文件。
下面是角色日志文件的输出内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Error starting NodeManager org.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK: Permission denied at org.apache.hadoop.service.ServiceStateException.convert(ServiceStateException.java:59) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:172) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartRecoveryStore(NodeManager.java:181) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:245) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:562) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:609) Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK: Permission denied at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200) at org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218) at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168) at org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService.openDatabase(NMLeveldbStateStoreService.java:944) at org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService.initStorage(NMLeveldbStateStoreService.java:931) at org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.serviceInit(NMStateStoreService.java:204) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163) ... 5 more |
通过网络查看不只人遇到过这样的问题
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!!!
1. 原理通透 2. 思路清晰 3.操作娴熟
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步