启动kafka2.8报afka.common.KafkaException: No `meta.properties` found in /tmp/kraft-combined-logs

1.异常

~/mine/kafka_2.13-2.8.0$ ./bin/kafka-server-start.sh config/kraft/server.properties 
[2021-06-05 16:06:47,771] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-06-05 16:06:48,053] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2021-06-05 16:06:48,141] WARN No meta.properties file under dir /tmp/kraft-combined-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2021-06-05 16:06:48,143] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
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:164)
	at scala.collection.immutable.List.foreach(List.scala:333)
	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)

2.解决,需运行kafka-storage.sh

ThinkPad-E15:~/mine/kafka_2.13-2.8.0$ ./bin/kafka-storage.sh random-uuid
9-FMU2PUQEOqvt09-0_F-g
ThinkPad-E15:~/mine/kafka_2.13-2.8.0$ ./bin/kafka-storage.sh format -t 9-FMU2PUQEOqvt09-0_F-g -c ./config/kraft/server.properties 
Formatting /tmp/kraft-combined-logs
ThinkPad-E15:~/mine/kafka_2.13-2.8.0$ ./bin/kafka-server-start.sh ./config/kraft/server.properties

 

上一篇:【XR-4】题


下一篇:Mongodb 安装