IO error:/var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK: 권한이 부족합니다.

14960 단어 Hadoop

Cloudera Manager 시작 Yarn 오류

  • 오류 로그는 다음과 같습니다
  • 솔루션:
  • login the related node server, check the permission and ownership of those directories/var/lib/hadoop-*, I got the following info
  • they are not right. so we need to do the following steps to fix it

  • 오류 로그는 다음과 같습니다.

     2 11:40.502 	INFO	AbstractService	
    Service org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService failed in state INITED; cause: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK:  
    org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: /var/lib/hadoop-yarn/yarn-nm-recovery/yarn-nm-state/LOCK:  
    	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)
    	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)
    

    솔루션:


    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-*
    

    좋은 웹페이지 즐겨찾기