zoukankan      html  css  js  c++  java
  • ambari journalnode异常Can't scan a pre-transactional edit log

    今天在删日志文件,不知道删错哪个地方了。

    该目录下一直报错,这个日志文件增长很快,

    /var/log/hadoop/hdfs/ hadoop-hdfs-journalnode-xx.log

     先备份/hadoop/hdfs/journal/这个目录

    方式一:

      然后删除除version之外的文件,重启之后就没有错误日志了,但是从文件大小来看,是少了很多

    方式二:

      备份别的服务器上的文件,删除当前机器的除version之外的文件,并将别的机器的文件拷贝至journal目录下(不要覆盖version)

    https://blog.csdn.net/liu82327114/article/details/78601153?locationNum=8&fps=1

    https://blog.csdn.net/u010936936/article/details/74199306

    2017-11-22 11:08:30,510 WARN  namenode.FSImage (EditLogFileInputStream.java:scanEditLog(364)) - After resync, position is 1044480
    2017-11-22 11:08:30,510 WARN  namenode.FSImage (EditLogFileInputStream.java:scanEditLog(359)) - Caught exception after scanning through 0 ops from /hadoop/hdfs/journal/ha/current/edits_inprogress_0000000000008164541 while determining its valid length. Position was 1044480
    java.io.IOException: Can't scan a pre-transactional edit log.
    at org.apache.hadoop.hdfs.server.namenode.FSEditLogOp$LegacyReader.scanOp(FSEditLogOp.java:4592)
    at org.apache.hadoop.hdfs.server.namenode.EditLogFileInputStream.scanNextOp(EditLogFileInputStream.java:245)
    at org.apache.hadoop.hdfs.server.namenode.EditLogFileInputStream.scanEditLog(EditLogFileInputStream.java:355)
    at org.apache.hadoop.hdfs.server.namenode.FileJournalManager$EditLogFile.scanLog(FileJournalManager.java:551)
    at org.apache.hadoop.hdfs.qjournal.server.Journal.scanStorageForLatestEdits(Journal.java:193)
    at org.apache.hadoop.hdfs.qjournal.server.Journal.<init>(Journal.java:153)
    at org.apache.hadoop.hdfs.qjournal.server.JournalNode.getOrCreateJournal(JournalNode.java:93)
    at org.apache.hadoop.hdfs.qjournal.server.JournalNode.getOrCreateJournal(JournalNode.java:102)
    at org.apache.hadoop.hdfs.qjournal.server.JournalNodeRpcServer.getJournalState(JournalNodeRpcServer.java:124)
    at org.apache.hadoop.hdfs.qjournal.protocolPB.QJournalProtocolServerSideTranslatorPB.getJournalState(QJournalProtocolServerSideTranslatorPB.java:118)
    at org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos$QJournalProtocolService$2.callBlockingMethod(QJournalProtocolProtos.java:25415)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2086)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2082)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1693)

    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2080),

    第一种方案

    此节点的journalnode的元数据出现了问题,需要从其他正常节点的journalnode的元数据拷贝过来重启服务,需要注意各个文件的权限

    第二种方案

    先停止journalnode服务

    删除此节点journalnode元数据存储路径中current文件夹中version以外的文件,启动journalnode

  • 相关阅读:
    fopen
    alsa 编程
    Alsa中PCM参数设置⭐⭐
    malloc、calloc、realloc和alloca各种的区别
    微信支付:微信支付遇到的坑:jssdk,phpdemo,微信支付提示{"errMsg":"chooseWXPay:fail"}
    java: 观察者模式:Observable被观察者,Observer观察者
    java: Comparable比较器,定义二叉操作类
    java: Comparable比较器,数组对象比较器
    微信支付:价格问题:如果支付金额是单位是分,不能带小数点
    centos:rpm安装,软件安装
  • 原文地址:https://www.cnblogs.com/0xcafedaddy/p/8962855.html
Copyright © 2011-2022 走看看