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

THEYUNG 发表于: 2021-06-18   最后更新时间: 2021-06-18 17:35:58   2,623 游览
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
发表于 2021-06-18
添加评论

不要放在tmp目录下,linux会自行回收这里的东西。

THEYUNG -> 半兽人 3年前

那现在需要迁移目录吗 怎么操作呢

THEYUNG -> 半兽人 3年前

跟我配置定期删除历史数据有关系吗

半兽人 -> THEYUNG 3年前

linux的行为。停了kafka换个目录。可以copy过去。

THEYUNG -> 半兽人 3年前

cp 过去重启就可以了吗

你的答案

查看kafka相关的其他问题或提一个您自己的问题