You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2024/09/11 16:47:00 UTC

[jira] [Assigned] (KAFKA-17525) Convert the UnknownServerException to InvalidRequestException when altering client-metrics config at runtime

     [ https://issues.apache.org/jira/browse/KAFKA-17525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chia-Ping Tsai reassigned KAFKA-17525:
--------------------------------------

    Assignee: TaiJuWu  (was: Chia-Ping Tsai)

> Convert the UnknownServerException to InvalidRequestException when altering client-metrics config at runtime
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-17525
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17525
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: TaiJuWu
>            Priority: Minor
>
> see following test:
> {code:bash}
> chia7712@fedora:~/project/kafka$ bin/kafka-configs.sh --bootstrap-server 192.168.1.149:22222 --alter --entity-type client-metrics --entity-name test --add-config interval.ms=bbb
> Error while executing config command with args '--bootstrap-server 192.168.1.149:22222 --alter --entity-type client-metrics --entity-name test --add-config interval.ms=bbb'
> java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
> 	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
> 	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
> 	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
> 	at kafka.admin.ConfigCommand$.alterResourceConfig(ConfigCommand.scala:581)
> 	at kafka.admin.ConfigCommand$.alterConfig(ConfigCommand.scala:449)
> 	at kafka.admin.ConfigCommand$.processCommand(ConfigCommand.scala:351)
> 	at kafka.admin.ConfigCommand$.main(ConfigCommand.scala:100)
> 	at kafka.admin.ConfigCommand.main(ConfigCommand.scala)
> Caused by: org.apache.kafka.common.errors.UnknownServerException: The server experienced an unexpected error when processing the request.
> {code}
> By contrast, `topic` resource can handle the such error and then return `InvalidRequestException`
> {code:bash}
> chia7712@fedora:~/project/kafka$ bin/kafka-configs.sh --bootstrap-server 192.168.1.149:22222 --alter --topic chia --add-config flush.ms=aaa
> Error while executing config command with args '--bootstrap-server 192.168.1.149:22222 --alter --topic chia --add-config flush.ms=aaa'
> java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidConfigurationException: Invalid value aaa for configuration flush.ms: Not a number of type LONG
> 	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
> 	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
> 	at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:180)
> 	at kafka.admin.ConfigCommand$.alterResourceConfig(ConfigCommand.scala:581)
> 	at kafka.admin.ConfigCommand$.alterConfig(ConfigCommand.scala:371)
> 	at kafka.admin.ConfigCommand$.processCommand(ConfigCommand.scala:351)
> 	at kafka.admin.ConfigCommand$.main(ConfigCommand.scala:100)
> 	at kafka.admin.ConfigCommand.main(ConfigCommand.scala)
> Caused by: org.apache.kafka.common.errors.InvalidConfigurationException: Invalid value aaa for configuration flush.ms: Not a number of type LONG
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)