我使用kafka 3.0.0的KRaft模式,安装kafka集群,报:
ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
kafka.common.InconsistentNodeIdException: Configured node.id1
doesn't match stored node.id0
in meta.properties. If you moved your data, make sure your configured controller.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
我运行kafka 3.0 raft单节点报:
bin/kafka-server-start.sh config/kraft/server.properties
错误详情:
[2021-10-11 19:21:52,669] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-10-11 19:21:53,056] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2021-10-11 19:21:53,181] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
kafka.common.InconsistentNodeIdException: Configured node.id `1` doesn't match stored node.id `0' in meta.properties. If you moved your data, make sure your configured controller.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
at kafka.server.KafkaRaftServer$.initializeLogDirs(KafkaRaftServer.scala:173)
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)
请问我该如何解决?
译:
你启动的node.id与存储的不同,
meta.properties
位置默认在log.dirs=/tmp/kraft-broker-logs
。我粗心了,感谢大佬,修改掉好了。
ok,结贴吧
你的答案