Hello,

I would like to report a mistake in the Kafka 3.7 Documentation -> 6.10 KRaft 
-> ZooKeeper to KRaft Migration -> Reverting to ZooKeeper mode During the 
Migration.

While migrating my Kafka + Zookeeper cluster to KRaft and testing rollbacks at 
a different migration stages I have noticed, that "Directions for reverting" 
provided for "Migrating brokers to KRaft" are wrong.

Following the first step provided in documentation you suppose to : On each 
broker, remove the process.roles configuration, and restore the 
zookeeper.connect configuration to its previous value. If your cluster requires 
other ZooKeeper configurations for brokers, such as zookeeper.ssl.protocol, 
re-add those configurations as well. Then perform a rolling.

In that case, if you remove process.roles configuration and restore 
zookeeper.connect as well as other ZooKeeper configuration (If your cluster 
requires) you will receive an error that looks like this:
[2024-05-28 08:09:49,396] lvl=ERROR Exiting Kafka due to fatal exception 
logger=kafka.Kafka$
java.lang.IllegalArgumentException: requirement failed: 
controller.listener.names must be empty when not running in KRaft mode: 
[CONTROLLER]
        at scala.Predef$.require(Predef.scala:337)
        at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:2441)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:2290)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1639)
        at kafka.Kafka$.buildServer(Kafka.scala:71)
        at kafka.Kafka$.main(Kafka.scala:90)
        at kafka.Kafka.main(Kafka.scala)

However I was able to perform rollback successfully by performing additional 
steps:

  *   Restore zookeeper.metadata.migration.enable=true line in broker 
configuration;
  *   We are using authorizer.class.name, so it also had to be reverted: 
org.apache.kafka.metadata.authorizer.StandardAuthorizer -> 
kafka.security.authorizer.AclAuthorizer;

I believe that should be mentioned.

Edgar Zubel
DevOps Engineer
edgar.zu...@teliacompany.com<mailto:edgar.zu...@teliacompany.com>

[En bild som visar text, klocka  Automatiskt genererad beskrivning]


This email may contain information which is privileged or protected against 
unauthorized disclosure or communication. If you are not the intended 
recipient, please notify the sender and delete this message and any attachments 
from your system without producing, distributing or retaining copies thereof or 
disclosing its contents to any other person.

Telia Company processes emails and other files that may contain personal data 
in accordance with Telia Company's Privacy 
Policy<https://www.teliacompany.com/en/about-the-company/privacy/>.


Reply via email to