无法在ambari中重新启动yarn node-manager

时间:2016-05-24 06:09:24

标签: java hadoop yarn ambari bigdata

我是ambari和yarn的新蜜蜂,我的新款flash ambari机器没有任何其他配置。

ambari版本是最新的,这里是yarn.py地址: ambari-server / src / main / resources / common-services / YARN / 2.1.0.2.0 / package / scripts / yarn.py

我发现了一些潜在的解决方案,例如,https://community.hortonworks.com/questions/11907/nodemanager-fails-to-start-io-error-lock.htmlhttps://reviews.apache.org/r/38098/diff/1/,但是,它不起作用。

我已经提供了对日志目录的所有权利。

2016-05-24 11:36:17,712 FATAL nodemanager.NodeManager (NodeManager.java:initAndStartNodeManager(528)) - Error starting NodeManager
org.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /data/var/log/hadoop-yarn/nodemanager/recovery-state/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:177)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:219)
        at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:525)
        at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:573)
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /data/var/log/hadoop-yarn/nodemanager/recovery-state/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.initStorage(NMLeveldbStateStoreService.java:930)
        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
2016-05-24 11:36:17,738 INFO  nodemanager.NodeManager (LogAdapter.java:info(45)) - SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NodeManager at hadoop134.linesum/192.168.21.134

3 个答案:

答案 0 :(得分:2)

首先尝试检查权限:

ls -l /data/var/lib/ | grep hadoop

在你的情况下,你会发现这样的事情:

d---------. 4    root         root          44 Apr 5 09:45 hadoop-yarn

你必须做两件事:

将用户和群组更改为纱线:

chown -R yarn:yarn data/var/log/hadoop-yarn

将权限更改为755:

chmod -R 755 data/var/log/hadoop-yarn

答案 1 :(得分:0)

尝试将此文件的 / data / var / log / hadoop-yarn / nodemanager / recovery-state / yarn-nm-state / 的权限更改为700或甚至777

命令: chmod 777 / data / var / log / hadoop-yarn / nodemanager / recovery-state / yarn-nm-state /

答案 2 :(得分:0)

您需要检查尝试访问该文件的用户是谁。最有可能的是"纱线"用户。在Ambari计算机上运行以下命令

Assembly.GetCallingAssembly()

如果有效,你可以尝试检查nodemanager输出和日志文件以获取更多信息。