NodeManager啓動報錯:Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst
以下:java
2021-01-18 11:27:02,689 INFO org.apache.hadoop.yarn.server.nodemanager.NodeManager: registered UNIX signal handlers for [TERM, HUP, INT] 2021-01-18 11:27:03,118 INFO org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService: Using state database at /home/yarn/recover/yarn-nm-state for recovery 2021-01-18 11:27:03,155 INFO org.apache.hadoop.service.AbstractService: Service org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService failed in state INITED; cause: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst 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) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartRecoveryStore(NodeManager.java:150) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:192) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:743) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:791) 2021-01-18 11:27:03,159 INFO org.apache.hadoop.service.AbstractService: Service NodeManager failed in state INITED; cause: org.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst org.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst 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:150) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:192) at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:743) at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:791) Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: 4 missing files; e.g.: /mydata/data/yarn/yarn/recover/yarn-nm-state/000030.sst 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)
解決辦法:刪除 /mydata/data/yarn/yarn/recover/yarn-nm-state文件夾內的內容,從新啓動便可。