尝试使用主题时发生Kafka GroupAuthorizationException

尝试使用主题时发生Kafka GroupAuthorizationException,exception,apache-kafka,authorization,Exception,Apache Kafka,Authorization,在卡夫卡主题上消费时,我们面临着GroupAuthorizationException问题。 在日志中,我可以看到它指的是默认的消费者组 这是我的卡夫卡瑟CR,他将组定义为快乐用户消费者组: apiVersion: kafka.strimzi.io/v1beta1 kind: KafkaUser metadata: name: happy-user-consumer labels: strimzi.io/cluster: cluster1 spec: authenticati

在卡夫卡主题上消费时,我们面临着
GroupAuthorizationException
问题。
在日志中,我可以看到它指的是默认的消费者组

这是我的卡夫卡瑟CR,他将组定义为快乐用户消费者组:

apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaUser
metadata:
  name: happy-user-consumer
  labels:
    strimzi.io/cluster: cluster1
spec:
  authentication:
    type: tls
  authorization:
    type: simple
    acls:
      - resource:
          type: topic
          name: happy-topic
          patternType: literal
        operation: Read
        host: "*"
      - resource:
          type: topic
          name: happy-topic
          patternType: literal
        operation: Describe
        host: "*"
     - resource:
          type: group
          name: happy-user-consumer-group
          patternType: literal
        operation: Read
        host: "*"
错误:org.apache.kafka.common.errors.GroupAuthorizationException:非 授权访问组:console-consumer-4399

我不确定它指向的是控制台消费者组的哪里

此外,使用下面的脚本,我无法列出消费者群体。我们是否有其他方式查看消费群体列表

./bin/kafka-consumer-groups.sh --bootstrap-server kafka.viswa.com:9094 --command-config /tmp/prod/consumer.properties --list

这里需要帮助

您使用的cli命令是正确的。也许你没有列出消费者群体

那么,你是如何从这个话题开始消费的呢?是否也通过cli?然后你可以像这样使用脚本

./bin/kafka-console-consumer.sh --topic happy-topic --from-beginning --group happy-user-consumer-group --bootstrap-server kafka.viswa.com:9094 --command-config /tmp/prod/consumer.properties
强制消费者使用特定的消费者组名称。该组将是您在kafkauser CR中授权的组。如果您未指定
--组
,则Kafka将使用默认组名,
console-consumer-4369

希望这对您有所帮助,我将感谢您的反馈

祝你好运,
Stephan

请编辑您的问题并包括您的消费者是如何配置的,好吗?