kafka KRaft报kafka.common.InconsistentNodeIdException: Configured node.id `1` doesn't match stored node.id `0' in meta.properties.

识趣 发表于: 2021-10-11   最后更新时间: 2021-10-11 20:19:09   116 游览

我使用kafka 3.0.0的KRaft模式,安装kafka集群,报:

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).

我运行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)

请问我该如何解决?



发表于 16天前

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).

译:

配置的 node.id 1 与 meta.properties 中存储的 node.id 0 不匹配。 如果您移动了数据,请确保您配置的 controller.id 匹配。 如果您打算创建新broker,您应该删除数据目录 (log.dirs) 中的所有数据。

你启动的node.id与存储的不同,meta.properties位置默认在log.dirs=/tmp/kraft-broker-logs

识趣 -> 半兽人 15天前

我粗心了,感谢大佬,修改掉好了。

半兽人 -> 识趣 15天前

ok,结贴吧

你的答案

查看kafka相关的其他问题或提一个您自己的问题

找不到想要的答案?提一个您自己的问题。

我要提问
提问