The kafka configuration file appears to be for a legacy cluster. Formatting is only supported for clusters in KRaft mode.

啊啊 发表于: 2021-09-28   最后更新时间: 2021-09-28 20:03:05   1,871 游览

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

The kafka configuration file appears to be for a legacy cluster. Formatting is only supported for clusters in KRaft mode.

我使用的这个命令创建的:

kafka-storage.sh format --config /opt/kafka/config/server.properties --cluster-id aaaaaaaaaaaaaaaaaaaaaa

请问我该如何解决?

发表于 2021-09-28

The kafka configuration file appears to be for a legacy cluster. Formatting is only supported for clusters in KRaft mode.

翻译过来就是:

你提供的kafka配置文件是为一个传统集群准备的。不包含KRaft模式下需要参数。

你的/opt/kafka/config/server.properties配置中,必须包含KRaft所需的

process.roles=broker,controller
controller.quorum.voters=172.21.0.1:9092,172.21.0.1:9093,172.21.0.1:9094
controller.listener.names=PLAINTEXT
inter.broker.listener.name=PLAINTEXT1

这些配置。

你的答案

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