【发布时间】:2019-09-09 20:48:03
【问题描述】:
当我看到这个错误信息时:
错误关闭代理,因为 /tmp/kafka-logs 中的所有日志目录都失败了 (kafka.log.LogManager)
首先想到的是“/tmp 目录可能已被操作系统 (linux) 清除 - 所以我应该更新 kafka 配置以指向永久的东西。但是目录存在并且没有被擦除:
ll /tmp/kafka-logs/
total 20
drwxrwxr-x 2 ec2-user ec2-user 38 Apr 7 16:56 __consumer_offsets-0
drwxrwxr-x 2 ec2-user ec2-user 38 Apr 7 16:56 __consumer_offsets-7
drwxrwxr-x 2 ec2-user ec2-user 38 Apr 7 16:56 __consumer_offsets-42
..
drwxrwxr-x 2 ec2-user ec2-user 38 Apr 7 16:56 __consumer_offsets-32
drwxrwxr-x 2 ec2-user ec2-user 141 Apr 12 02:49 flights_raw-0
drwxrwxr-x 2 ec2-user ec2-user 178 Apr 12 08:25 air2008-0
drwxrwxr-x 2 ec2-user ec2-user 141 Apr 12 13:38 testtopic-0
-rw-rw-r-- 1 ec2-user ec2-user 1244 Apr 17 22:29 recovery-point-offset-checkpoint
-rw-rw-r-- 1 ec2-user ec2-user 4 Apr 17 22:29 log-start-offset-checkpoint
-rw-rw-r-- 1 ec2-user ec2-user 1248 Apr 17 22:30 replication-offset-checkpoint
那么这实际上意味着什么,为什么会发生以及应该做些什么来纠正/避免错误?
【问题讨论】:
-
请提供
kafka-logs目录的权限。请指定运行代理的用户。 -
/tmp/kafka-logs由运行kafka的用户自动创建/拥有,即ec2-user
标签: apache-kafka