Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.6.0
-
None
-
None
Description
$ bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config producer_byte_rate=1000000000,consumer_byte_rate=1000000000 --entity-type clients --entity-default
This usage of --entity-default with --bootstrap-server for alternating configs will trigger the exception below. Similar for --describe
/opt/kafka-dev/bin/kafka-configs.sh --bootstrap-server ducker04:9093 --describe --entity-type clients --entity-default --command-config /opt/kafka-dev/bin/hi.properties
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.UnknownServerException: Path must not end with / character
at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:104)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:272)
at kafka.admin.ConfigCommand$.getAllClientQuotasConfigs(ConfigCommand.scala:501)
at kafka.admin.ConfigCommand$.getClientQuotasConfig(ConfigCommand.scala:487)
at kafka.admin.ConfigCommand$.alterConfig(ConfigCommand.scala:361)
at kafka.admin.ConfigCommand$.processCommand(ConfigCommand.scala:292)
at kafka.admin.ConfigCommand$.main(ConfigCommand.scala:91)
at kafka.admin.ConfigCommand.main(ConfigCommand.scala)
Caused by: org.apache.kafka.common.errors.UnknownServerException: Path must not end with / character
However, if the --entity-type is brokers, the alternation works fine.
$ No exception, works properly
bin/kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-default --alter --add-config unclean.leader.election.enable=true
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type brokers --entity-default
Update:
For --describe:
Commands work properly:
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type brokers --entity-default
bin/kafka-configs.sh --zookeeper localhost:2181 --describe --broker-defaults
Commands do not work:
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type topics --entity-default
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type users --entity-default
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type clients --entity-default
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --client-defaults
bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --user-defaults
For --alter:
Commands work properly:
bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config max.messages.bytes=128000 --entity-type topics --entity-default (an entity name must be specified with --alter of topics)
bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config unclean.leader.election.enable=true --entity-type brokers --entity-default
Commands do not work:
bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config producer_byte_rate=1000000000,consumer_byte_rate=1000000000 --entity-type clients --entity-default
bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config producer_byte_rate=44444 --entity-type users --entity-default (No exception thrown but failed to add the config)
bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config producer_byte_rate=1000000000,consumer_byte_rate=1000000000 --client-defaults
bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config producer_byte_rate=44444 --user-defaults (No exception thrown but failed to add the config)
Attachments
Issue Links
- links to