kafka遇到Error while writing to checkpoint file /tmp/kraft-combined-logs/hello-kraft-1/leader-epoch-checkpoint java.io.FileNotFoundException

David 发表于: 2025-02-13   最后更新时间: 2025-02-14 09:21:32   51 游览

kafka运行了半年突然遇到这个错误,就挂了。

我用的kafka3.6.1,然后用的3台集群,用的kraft,其中一台突然遇到这个挂掉了。

配置如下:

num.recovery.threads.per.data.dir=1
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
log.retention.hours=168
log.segment.bytes=1073741824
log.retention.check.interval.ms=300000
Error while writing to checkpoint file /tmp/kraft-combined-logs/hello-kraft-1/leader-epoch-checkpoint (org.apache.kafka.storage.internals.log.LogDirFailureChannel) java.io.FileNotFoundException: /tmp/kraft-combined-logs/hello-kraft-1/leader-epoch-checkpoint.tmp (No such file or directory)

我已经重启了,但是没有找到这个问题的根本原因,权限,语句,存储,硬件故障我都排查了,均没有发现问题,请问这个是为什么呢

发表于 2025-02-13
添加评论

kafka的数据默认存储在临时目录(log.dir=/tmp/kafka-logs)下,系统会自动回收这里面的数据,从而导致kafka异常挂掉。

换个目录就好了。

David -> 半兽人 7天前

日志目录,我已经更正,看之后是否还会遇到类似问题,谢谢大佬指点

你的答案

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