标签:test dem blog httpfs lib source led ted services
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!!!
标签:test dem blog httpfs lib source led ted services
原文地址:http://www.cnblogs.com/DBA-Ivan/p/7898235.html