[ 
https://issues.apache.org/jira/browse/KAFKA-16449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832763#comment-17832763
 ] 

Vedarth Sharma commented on KAFKA-16449:
----------------------------------------

Hey!

Docker image only supports KRaft mode. In quickstart guide also, docker image 
option is mentioned inside Kraft section https://kafka.apache.org/quickstart. 
But for further clarity we can mention this explicitly in documentation.

Hence this behaviour is expected. Another improvement can be to improve the 
error message, so that this image does not get used with zookeeper.

I have created this ticket to track the required changes 
https://issues.apache.org/jira/browse/KAFKA-16453

> 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
>            Priority: Major
>
> 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)

Reply via email to