说明:记录一次kafka启动多个错误,如下,提示kafka的数据文件夹里没有“meta.properties”
[2024-10-08 19:03:08,009] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2024-10-08 19:03:08,386] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2024-10-08 19:03:08,466] WARN No meta.properties file under dir /tmp/kraft-combined-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2024-10-08 19:03:08,469] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.KafkaException: No `meta.properties` found in /tmp/kraft-combined-logs (have you run `kafka-storage.sh` to format the directory?)
at kafka.server.BrokerMetadataCheckpoint$.$anonfun$getBrokerMetadataAndOfflineDirs$2(BrokerMetadataCheckpoint.scala:179)
at scala.collection.immutable.List.foreach(List.scala:333)
at kafka.server.BrokerMetadataCheckpoint$.getBrokerMetadataAndOfflineDirs(BrokerMetadataCheckpoint.scala:168)
at kafka.server.KafkaRaftServer$.initializeLogDirs(KafkaRaftServer.scala:141)
at kafka.server.KafkaRaftServer.<init>(KafkaRaftServer.scala:57)
at kafka.Kafka$.buildServer(Kafka.scala:83)
at kafka.Kafka$.main(Kafka.scala:91)
at kafka.Kafka.main(Kafka.scala)
解决:进入到kafka的bin目录下,执行下面两行命令,重启启动;
(先获取一个uuid)
./kafka-storage.sh random-uuid
(再用format方式启动)
./kafka-storage.sh format -t 上面产生的uuid -c ../config/kraft/server.properties
如下:
标签:错误,启动,08,scala,server,Kafka,kafka,BrokerMetadataCheckpoint From: https://blog.csdn.net/qq_42108331/article/details/142770927