[2021-11-11 17:18:31,608] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
kafka.common.KafkaException: No `meta.properties` found in D:kafka_2.12-2.8.1kraft-combined-logs (have you run `kafka-storage.sh` to format the directory?)
        at kafka.server.BrokerMetadataCheckpoint$.$anonfun$getBrokerMetadataAndOfflineDirs$2(BrokerMetadataCheckpoint.scala:164)
        at scala.collection.Iterator.foreach(Iterator.scala:943)
        at scala.collection.Iterator.foreach$(Iterator.scala:943)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
        at scala.collection.IterableLike.foreach(IterableLike.scala:74)
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
        at kafka.server.BrokerMetadataCheckpoint$.getBrokerMetadataAndOfflineDirs(BrokerMetadataCheckpoint.scala:153)
        at kafka.server.KafkaRaftServer$.initializeLogDirs(KafkaRaftServer.scala:150)
        at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:53)
        at kafka.Kafka$.buildServer(Kafka.scala:79)
        at kafka.Kafka$.main(Kafka.scala:87)
        at kafka.Kafka.main(Kafka.scala)

1.解决方案

PS D:\kafka_2.12-2.8.1> .\bin\kafka-storage.sh random-uuid
PS D:\kafka_2.12-2.8.1> .\bin\windows\kafka-run-class.bat kafka.tools.StorageTool random-uuid
sptV73uhQTq8I6khCvixAg
PS D:\kafka_2.12-2.8.1> .\bin\windows\kafka-run-class.bat kafka.tools.StorageTool format -t sptV73uhQTq8I6khCvixAg -c ./config/kraft/server.properties
Formatting D:kafka_2.12-2.8.1kraft-combined-logs
PS D:\kafka_2.12-2.8.1> .\bin\windows\kafka-server-start.bat ./config/kraft/server.properties

 

 

 

 

Logo

Kafka开源项目指南提供详尽教程,助开发者掌握其架构、配置和使用,实现高效数据流管理和实时处理。它高性能、可扩展,适合日志收集和实时数据处理,通过持久化保障数据安全,是企业大数据生态系统的核心。

更多推荐