返回到文章

采纳

编辑于 3年前

Kafka运行一段时间就会报错停止 java.nio.file.NoSuchFileException: /tmp/kafka-logs/__consumer_offsets-14/00000000000000000000.log

kafka

java.nio.file.NoSuchFileException: /tmp/kafka-logs/__consumer_offsets-14/00000000000000000000.log
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:409)
    at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
    at java.nio.file.Files.move(Files.java:1395)
    at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:697)
    at org.apache.kafka.common.record.FileRecords.renameTo(FileRecords.java:212)
    at kafka.log.LogSegment.changeFileSuffixes(LogSegment.scala:415)
    at kafka.log.Log.asyncDeleteSegment(Log.scala:1619)
    at kafka.log.Log.$anonfun$replaceSegments$1(Log.scala:1671)
    at kafka.log.Log.$anonfun$replaceSegments$1$adapted(Log.scala:1666)
    at scala.collection.immutable.List.foreach(List.scala:389)
    at kafka.log.Log.replaceSegments(Log.scala:1666)
    at kafka.log.Cleaner.cleanSegments(LogCleaner.scala:535)
    at kafka.log.Cleaner.$anonfun$doClean$6(LogCleaner.scala:462)
    at kafka.log.Cleaner.$anonfun$doClean$6$adapted(LogCleaner.scala:461)
    at scala.collection.immutable.List.foreach(List.scala:389)
    at kafka.log.Cleaner.doClean(LogCleaner.scala:461)
    at kafka.log.Cleaner.clean(LogCleaner.scala:438)
    at kafka.log.LogCleaner$CleanerThread.cleanOrSleep(LogCleaner.scala:305)
    at kafka.log.LogCleaner$CleanerThread.doWork(LogCleaner.scala:291)
    at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:82)
    Suppressed: java.nio.file.NoSuchFileException: /tmp/kafka-logs/__consumer_offsets-14/00000000000000000000.log -> /tmp/kafka-logs/__consumer_offsets-14/00000000000000000000.log.deleted
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:396)
        at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
        at java.nio.file.Files.move(Files.java:1395)
        at org.apache.kafka.common.utils.Utils.atomicMoveWithFallback(Utils.java:694)
        ... 16 more