Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5506

bin/kafka-consumer-groups.sh failing to query offsets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.11.0.1, 1.0.0
    • consumer
    • Linux slfd06 4.4.0-78-generic #99~14.04.2-Ubuntu SMP Thu Apr 27 18:49:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

    Description

      When I found that bin/kafka-consumer-offset-checker.sh was deprecated and didn't work, I checked the docs and ran the following instead (using new consumer, and coordinator vs zookeeper):

      bin/kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --describe --group test
      

      I kept getting a NullPointerException though (line numbers are a bit off because of debug code):

      java.lang.NullPointerException
              at org.apache.kafka.common.utils.Utils.join(Utils.java:399)
              at org.apache.kafka.common.requests.OffsetFetchRequest$Builder.toString(OffsetFetchRequest.java:77)
              at java.lang.String.valueOf(String.java:2994)
              at java.lang.StringBuilder.append(StringBuilder.java:131)
              at org.apache.kafka.clients.ClientRequest.toString(ClientRequest.java:65)
              at org.apache.kafka.clients.NetworkClient.doSend(NetworkClient.java:375)
              at org.apache.kafka.clients.NetworkClient.send(NetworkClient.java:332)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.trySend(ConsumerNetworkClient.java:409)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:252)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:208)
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:199)
              at kafka.admin.AdminClient$$anon$1.run(AdminClient.scala:61)
              at java.lang.Thread.run(Thread.java:748)
      Error: Executing consumer group command failed due to The server experienced an unexpected error when processing the request
      

      I tracked this down to the following. The request builder that is instantiated here has its partitions set to ALL_TOPIC_PARTITIONS which is null (v2 or newer to request all topic partitions). Later, when sending the request, it's converted to a string. But partitions above can only be null when built that way, so this throws the exception.

      I'm quite new to Kafka, so I'm still not entirely sure if I'm doing something wrong or if this is indeed a bug. As such, any pointers or advice would be much appreciated.

      Attachments

        Issue Links

          Activity

            People

              ijuma Ismael Juma
              amar_ Yousef Amar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: