kafka system_error ai_generated partial

LogDirOfflineException:一个或多个日志目录离线。

LogDirOfflineException: One or more log directories are offline.

ID: kafka/log-dir-offline

其他格式: JSON · Markdown 中文 · English
70%修复率
83%置信度
1证据数
2024-04-02首次发现

根因分析

磁盘故障或文件系统问题导致一个或多个 Kafka 数据目录无法访问,从而导致这些分区的代理不可用。

English

A disk failure or filesystem issue has caused one or more Kafka data directories to become inaccessible, leading to broker unavailability for those partitions.

generic

官方文档

https://kafka.apache.org/documentation/#log_dirs

解决方案

  1. Identify the offline directory from broker logs: `grep 'offline' /var/log/kafka/server.log`. Then unmount and check the disk with `fsck`, or replace it. After repair, restart the broker. Example: `sudo umount /data/kafka && sudo fsck -y /dev/sdb1 && sudo mount /data/kafka && kafka-server-start.sh config/server.properties`.

无效尝试

常见但无效的做法:

  1. 90% 失败

    Simply restarting the broker without addressing the disk failure will cause the same error; the broker will detect the offline directory again.

  2. 95% 失败

    Increasing log retention or cleanup policies doesn't fix a hardware failure; the underlying disk must be repaired or replaced.