Yusu Gao created KAFKA-16449:
--------------------------------
Summary: Kafka Docker run foce formatting with Zookeeper connect
setup and block kafka running
Key: KAFKA-16449
URL: https://issues.apache.org/jira/browse/KAFKA-16449
Project: Kafka
Issue Type: Bug
Affects Versions: 3.7.0
Reporter: Yusu Gao
I am adopting the official kafka image for testing purpose with zookeeper
enabled, however when trying to launch kafka, I get blocked with below message
mentioning about format issue:
{code:java}
b4870f897e2a:/opt/kafka$ /etc/kafka/docker/run
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Setting default values of environment variables if not already set.
===> Configuring ...
===> Launching ...
===> Using provided cluster id <some id> ...
The kafka configuration file appears to be for a legacy cluster. Formatting is
only supported for clusters in KRaft mode.
{code}
Which leads to:
[https://github.com/apache/kafka/blob/3.7.0/docker/jvm/launch#L57-L58],
which leads to
[https://github.com/apache/kafka/blob/3.7.0/core/src/main/scala/kafka/docker/KafkaDockerWrapper.scala#L46]
and then leads to
[https://github.com/apache/kafka/blob/3.7.0/core/src/main/scala/kafka/tools/StorageTool.scala#L90]
If my understanding is correct, StorageTools#format is only supposed to run for
KRaft mode, yet current docker image script is enforcing running this command
even for Zookeeper mode.
Please advise if this is actually by design or this should be fixed as a bug.
Thank you.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)