kafka启用权限后,kafka-consumer-group.sh查看消费组报错

漂泊的美好 发表于: 2017-09-21   最后更新时间: 2017-09-21 20:53:57   19,254 游览

目前kafka集群启用SASL_PLAINTEXT权限和ACl,在使用kafka-consumer-group.sh查看消费组消息情况时,报如下错误(无法上传图片只能手敲了)

WARN TGT renewal thread has been interrupted an will exit.(org.apache.kafka.common.security.kerberos.Kerberos)
Error while executing consumer group command Request GROUP_COORDINATOR failed on broker    List
    at kafka.admin.AdminClient.sendAnyNode(AdminClient.scala:67)
    at kafka.admin.AdminClient.findCoordinator(AdminClient.scala:72)
    at kafka.admin.AdminClient.describeGroup(AdminClient.scala:125)
    at kafka.admin.AdminClient.describeConsumerGroup(AdminClient.scala:147)
    at kafka.admin.ConsumerGroupCommand$KafkaconsumerGroupService.
    describeGroup(ConsumerGroupCommand.scala:308)
     at kafka.admin.ConsumerGroupCommand$ConsumerGroupService$
     Class.describe(ConsumerGroupCommand.scala:89)
     at kafka.admin.ConsumerGroupCommand$KafkaconsumerGroupService.
    describe(ConsumerGroupCommand.scala:296)
    at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:68)
    at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)

发表于 2017-09-21
添加评论

你好,我使用 SASL/SCRAM 认证之后kafka-consumer-group.sh查看消费组报错,搞了两天还没搞好

apple -> tiiimo 3年前

带上认证文件可以使用

./kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group test-group --command-config .xxx.properties

tiiimo -> apple 3年前

不行啊

vim kafka-broker-jaas.conf 
KafkaServer {
org.apache.kafka.common.security.scram.ScramLoginModule required
username="admin"
password="admin";
};
[midware@esb1 bin]$ ./kafka-consumer-groups.sh --bootstrap-server node1:9092,node2:9092,node3:9092 --describe --group devGroup --command-config /data/midware/kafka/kafka_2.12-2.2.0/config/kafka-broker-jaas.conf 
[2021-06-23 13:56:51,783] WARN The configuration 'KafkaServer' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'password' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'org.apache.kafka.common.security.scram.ScramLoginModule' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration '};' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
[2021-06-23 13:56:51,784] WARN The configuration 'username' was supplied but isn't a known config. (org.apache.kafka.clients.admin.AdminClientConfig)
Error: Executing consumer group command failed due to org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
    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:89)
    at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:260)
    at kafka.admin.ConsumerGroupCommand$ConsumerGroupService.collectGroupOffsets(ConsumerGroupCommand.scala:331)
    at kafka.admin.ConsumerGroupCommand$ConsumerGroupService.describeGroup(ConsumerGroupCommand.scala:251)
    at kafka.admin.ConsumerGroupCommand$.main(ConsumerGroupCommand.scala:59)
    at kafka.admin.ConsumerGroupCommand.main(ConsumerGroupCommand.scala)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting for a node assignment.
KiriharaRyouji -> tiiimo 2年前

你这是超时报错,应该是ip或者端口有问题吧。

你执行命令的时候也要带认证的。

这个肯定带了。先要kerberos认证之后。才执行命令

看下执行命令。

hust -> 半兽人 6年前

我也遇到了同样的问题,请问一下怎么解决

你好,kafka启用权限后,kafka-consumer-group.sh查看消费组报错 这个问题你解决了吗?

按照 https://blog.csdn.net/z11220857/article/details/77049613 的提示,执行命令

KAFKA_OPTS="-Djava.security.auth.login.config=/data1/kafka9101/config/kafka_client_jaas.conf" kafka-consumer-groups.sh --bootstrap-server loclahost:9101 --list

弄了很久也不能解决。报错如下:

Note: This will not show information about old Zookeeper-based consumers.
[2018-07-18 15:08:25,857] WARN Bootstrap broker 192.110.28.36:9999 (id: -1 rack: null) disconnected (org.apache.kafka.clients.NetworkClient)
Error: Executing consumer group command failed due to Request METADATA failed on brokers List(192.110.28.36:9999 (id: -1 rack: null)

可以借鉴一下你的命令吗?

何猫警长 -> hust 6年前

请问kafka启用权限后,kafka-consumer-group.sh查看消费组报错 这个问题你解决了吗

tiiimo -> 何猫警长 3年前

你好,这个问题解决了吗

./kafka-consumer-groups.sh --bootstrap-server 127.0.0.1:9092 --describe --group Test-Group --command-config ../config/consumer.properties

我用这个命令查看消费组情况是正常的,但是我执行

./kafka-consumer-groups.sh --bootstrap-server 127.0.0.1:9092 --list

就会报错。

报啥错 你咋不说呢,新开个问题吧。

你的答案

查看kafka相关的其他问题或提一个您自己的问题