Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
1. 问题现象
启动 kafka 时报错:Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
2. 解决方案
2.1 方案一
删除 /tmp/kafka-logs 目录,然后重启 kafka;
2.2 方案二
修改配置的日志文件目录
在 config/server.properties 中修改 log.dirs 的参数值。
如果文章对您有所帮助,可以点一下推荐