和开发确认 遗留的消息还需不需要,如果不需要,直接修改kafka-server的配置文件,重启即可
原因是删了kafka-logs下的日志,导致启动recover时无法找到恢复日志点。
kafka启动不起来 场景 启动 zookeeper 启动kafka 启动生产者 发消息 关闭afka 关闭 生产者 再次启动 报错
WARN Found a corrupted index file due to requirement failed: Corrupt index found, index file (D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.index) has non-zero size but the last offset is 0 which is no larger than the base offset 0.}. deleting D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.timeindex, D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.index, and D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.txnindex and rebuilding index... (kafka.log.Log)
[2017-09-06 15:25:32,747] ERROR There was an error in one of the threads during logs loading: java.nio.file.FileSystemException: D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.timeindex: 另一个程序正在使用此文件,进程无法访问 。
(kafka.log.LogManager)
[2017-09-06 15:25:32,749] FATAL [Kafka Server 0], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.nio.file.FileSystemException: D:\soft\kafka_2.11-0.11.0.0\logs\test-0\00000000000000000000.timeindex: 另一个程序正 在使用此文件,进程无法访问。