muralibasani commented on PR #13417:
URL: https://github.com/apache/kafka/pull/13417#issuecomment-1646626261

   > Hi, the behavior is different when I pass an invalid config file:
   > 
   > ```shell
   > ### OLD
   > $ bin/kafka-storage.sh info -c 
~/.local/tmp/kafka/server2/config/log4j.properties
   > Exception in thread "main" org.apache.kafka.common.config.ConfigException: 
Missing required configuration `zookeeper.connect` which has no default value.
   >    at kafka.server.KafkaConfig.validateValues(KafkaConfig.scala:2183)
   >    at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:2174)
   >    at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1580)
   >    at kafka.tools.StorageTool$.$anonfun$main$1(StorageTool.scala:50)
   >    at scala.Option.flatMap(Option.scala:283)
   >    at kafka.tools.StorageTool$.main(StorageTool.scala:50)
   >    at kafka.tools.StorageTool.main(StorageTool.scala)
   > 
   > $ bin/kafka-storage.sh format -c ~/Downloads/test/wrong.properties -t 
"$(bin/kafka-storage.sh random-uuid)"
   > The kafka configuration file appears to be for a legacy cluster. 
Formatting is only supported for clusters in KRaft mode.
   > 
   > ### NEW
   > $ bin/kafka-storage.sh info -c 
~/.local/tmp/kafka/server2/config/log4j.properties
   > Found problem:
   > /tmp/kafka-logs does not exist
   > 
   > $ bin/kafka-storage.sh format -c ~/Downloads/test/wrong.properties -t 
"$(bin/kafka-storage.sh random-uuid)"
   > The node.id must be set to a non-negative integer. We saw -1
   > ```
   > 
   > I still need to look the rest of the code. Will update later.
   
   these tests should be ok now. fixed. had to make changes similar to 
KafkaConfig


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to