kafka-ui
kafka-ui copied to clipboard
Invalid value for "delete.retention.ms" results in Kafka Broker crash
Entering an invalid value for the "delete.retention.ms" parameter causes the Kafka Broker to crash.
Log from the Kafka Broker:
org.apache.kafka.common.config.ConfigException: Invalid value -1 for configuration delete.retention.ms: Value must be at least 0
Hello there ChSchott! π
Thank you and congratulations π for opening your very first issue in this project! π
In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. π
Hey, thanks for reaching out. We'll take a look.
@Haarolean Can you please assign this to me ?
@ChSchott How did you specify "delete.retention.ms" property ? through kafka-ui application or other ways ?
Can you specify steps for reproducing the issue ?
@Haarolean If you have an idea how this could be reproduced. Please comment so that i can look into it further.
@ChSchott there is a bold and certain reason why we do have issue templates set in place. The one for a bug report (which you used it seems but decided not to follow one) contains an important block named "Steps to Reproduce". Please provide the steps.
This issue has been automatically marked as stale because no requested feedback has been provided. It will be closed if no further activity occurs. Thank you for your contributions.
@Haarolean To reproduce this error you can use the attached docker-compose file. This docker-compose file will start a single Kafka instance in Kraft mode (without Zookeeper). Dockerfiles.zip
Once the kafka and kafka-ui instance are running:
-
Open your Browser and navigate to localhost:8080
-
Click on "Add a Topic" as shown below

-
Enter the following custom topic parameters

-
Click Submit
-
After clicking Submit you while see an error message in the bottom right

-
Now navigate back to the dashboard. Make sure to refresh the Page. The Dashboard shows one kafka instance that is offline.

-
Now open a terminal and retrieve the the logs from Kafka:
docker logs kafka
The kafka instance is not able to recover itself for some reason. The only solution i found to resolve this issue is to delete all kafka docker volumes and thereafter restart the kafka container.
Any questions? Let me know. Cheers.
@ChSchott cool, thanks. @shubhwip kraft mode part might be important here. Still interested to take a look?
@ChSchott cool, thanks. @shubhwip kraft mode part might be important here. Still interested to take a look?
Yeah Sure :)
Thanks @ChSchott.
@Haarolean
I Reproduced this issue. basically as per kafka documentation, -1 is invalid value for delete.retention.ms so this invalid value is not handled properly on kafka side thus resulting in broker crash.
https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#topicconfigs_delete.retention.ms
We can have below ways to deal with this problem.
- We don't do anything because users should be aware about all these properties by seeking kafka confluent documentation :)
- we can show valid values next to each custom parameters to make sure users are informed and aware before providing values.
- Enforce valid values for each type of custom parameters in
kafka-uito avoid any invalid values. Currently weβd generalised same input type for all types of custom parameters. But if we want to enforce this then we need to have different types of input for different params. For e.g. property[compression.type](https://docs.confluent.io/platform/current/installation/configuration/topic-configs.html#topicconfigs_compression.type) has following valid values [uncompressed, zstd, lz4, snappy, gzip, producer] so a dropdown would be required so that end user wonβt be able to do any mistake. Other property for e.g. [delete.retention.ms] would require input type number with min and max values as set.
@Haarolean Did you get a chance to look at my above comment :) ?
@Haarolean Did you get a chance to look at my above comment :) ?
Yeaah I did, just left it without an answer.
Let's leave it as is for now, other options are too much work and not ideal.
Closing for now as we can't know all the possible values for all the possible properties.