title: Fail to restart yarn node-manager in ambari
body: <p>I am new bee for ambari and yarn, and I don't have any other configuration for my new flash ambari machine.</p>
  
  <p>the ambari version is latest, and here is the yarn.py address:
  ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py </p>
  
  <p>I have found out some potencial solutions like thie,<a href="https://community.hortonworks.com/questions/11907/nodemanager-fails-to-start-io-error-lock.html" rel="nofollow">https://community.hortonworks.com/questions/11907/nodemanager-fails-to-start-io-error-lock.html</a> and <a href="https://reviews.apache.org/r/38098/diff/1/" rel="nofollow">https://reviews.apache.org/r/38098/diff/1/</a>, however, it doesn't work.</p>
  
  <p>I have offer the all right to the log directory.</p>
  
  <pre><code>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
  </code></pre>