我使用kafka 3.0.0的KRaft模式,安装kafka集群,报:
ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: Invalid value test for configuration process.roles: String must be one of: broker, controller
错误详情:
[2021-09-28 07:15:23,133] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-09-28 07:15:23,577] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: Invalid value test for configuration process.roles: String must be one of: broker, controller
at org.apache.kafka.common.config.ConfigDef$ValidString.ensureValid(ConfigDef.java:961)
at org.apache.kafka.common.config.ConfigDef$ValidList.ensureValid(ConfigDef.java:937)
at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:499)
at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:483)
at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:113)
at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:146)
at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1391)
at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1394)
at kafka.Kafka$.buildServer(Kafka.scala:67)
at kafka.Kafka$.main(Kafka.scala:87)
at kafka.Kafka.main(Kafka.scala)
我的server.properties配置如下:
process.roles=master
请问我该如何解决?
process.roles
只支持配置broker, controller
这2个参数,所以你的master
是不认的(我也不知道你哪里看到的这个值)。正确的是:
或
或
你的答案