服务器异常关机,启动yarn nodemanager 报错 CURRENT file does not end with newline 处理方法

偶遇服务器宕机,服务器中很多文件损坏,启动nodemanager时,一直报错,日志如下,感觉是某个文件损坏造成的

2019-05-16 15:50:41,379 INFO  service.AbstractService (AbstractService.java:noteFailure(272)) - Service NodeManager failed in state INITE
D; cause: org.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: CURRENT file does not end with newlineorg.apache.hadoop.service.ServiceStateException: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: CURRENT file does n
ot end with newline    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:178)
    at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceInit(NodeManager.java:220)
    at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
    at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:546)
    at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:594)
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: Corruption: CURRENT file does not end with newline
    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:966
)    at org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService.initStorage(NMLeveldbStateStoreService.java:953)
    at org.apache.hadoop.yarn.server.nodemanager.recovery.NMStateStoreService.serviceInit(NMStateStoreService.java:200)
    at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
    ... 5 more

从日志中可知,CURRENT文件内容异常,但不知道具体路径,查资料获知,文件上层目录应该是yarn-nm-state,使用下面命令找到具体路径,删除文件,重启nodemanager,问题解决

find / -type d -name yarn-nm-state

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值