Failed to start NodeManager caused by "/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to start NodeManager caused by "/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK相关的知识,希望对你有一定的参考价值。
Hadoop 安装步骤: 0. 安装前准备(节点机器,环境设置,yum源设置) 1. 配置并安装Cloudera-Manager 2. 启动 CM 服务 3. 安装CDH,并配置集群 4. 启动
在启动Yarn时, NodeManager 启动失败。接下来查看对应的日志:Cloudera Manager 主页,点击YARN项操作,选择“实例”,点击角色类型,进入NodeManager 主页,在日志文件下拉框有stdout,stderr,角色日志文件,建议查看角色日志文件。
下面是角色日志文件的输出内容
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
[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
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!!!
以上是关于Failed to start NodeManager caused by "/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK的主要内容,如果未能解决你的问题,请参考以下文章
启动项目报错——A child container failed during start——解决Failed to start component [StandardEngine[Catalina]
CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load
zookeeper启动时Starting zookeeper ... FAILED TO START问题处理
service docker start 报错 :Failed to start docker.se
The required Server component failed to start so Tomcat is unable to start解决之一