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

Static consumer cannot join group due to ERROR in broker

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.1
    • Component/s: consumer, streams
    • Labels:

      Description

      A streams consumer using a static group instance id is unable to join the group due to an invalid group join – the consumer gets the error:

      ERROR stream-thread [x-stream-4a43d5d4-d38f-4cb0-8741-7a6c685abf15-StreamThread-1] Encountered the following unexpected Kafka exception during processing, this usually indicate Streams internal errors:
      [[EXCEPTION: org.apache.kafka.common.KafkaException: Unexpected error in join group response: The server experienced an unexpected error when processing the request.
          at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$JoinGroupResponseHandler.handle(AbstractCoordinator.java:599) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$JoinGroupResponseHandler.handle(AbstractCoordinator.java:527) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:978) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:958) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.RequestFuture$1.onSuccess(RequestFuture.java:204) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:167) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:127) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.fireCompletion(ConsumerNetworkClient.java:578) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.firePendingCompletedRequests(ConsumerNetworkClient.java:388) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:294) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:233) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:224) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.awaitMetadataUpdate(ConsumerNetworkClient.java:161) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.ensureFreshMetadata(ConsumerNetworkClient.java:172) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:346) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1251) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1216) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1201) ~[kafka-clients-2.3.0.jar:?]
          at org.apache.kafka.streams.processor.internals.StreamThread.pollRequests(StreamThread.java:941) ~[kafka-streams-2.3.0.jar:?]
          at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:846) ~[kafka-streams-2.3.0.jar:?]
          at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:805) ~[kafka-streams-2.3.0.jar:?]
          at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:774) [kafka-streams-2.3.0.jar:?]
      ]]
      

      On the broker, I see this error:

      [2019-07-25 08:14:11,978] ERROR [KafkaApi-1] Error when handling request: clientId=x-stream-4a43d5d4-d38f-4cb0-8741-7a6c685abf15-StreamThread-1-consumer, correlationId=6, api=JOIN_GROUP, body={group_id=x-stream,session_timeout_ms=10000,rebalance_timeout_ms=300000,member_id=,group_instance_id=lcrzf-1,protocol_type=consumer,protocols=[{name=stream,metadata=java.nio.HeapByteBuffer[pos=0 lim=64 cap=64]}]} (kafka.server.KafkaApis)
      java.util.NoSuchElementException: None.get
        at scala.None$.get(Option.scala:366)
        at scala.None$.get(Option.scala:364)
        at kafka.coordinator.group.GroupMetadata.generateMemberId(GroupMetadata.scala:368)
        at kafka.coordinator.group.GroupCoordinator.$anonfun$doUnknownJoinGroup$1(GroupCoordinator.scala:178)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:253)
        at kafka.coordinator.group.GroupMetadata.inLock(GroupMetadata.scala:209)
        at kafka.coordinator.group.GroupCoordinator.doUnknownJoinGroup(GroupCoordinator.scala:169)
        at kafka.coordinator.group.GroupCoordinator.$anonfun$handleJoinGroup$2(GroupCoordinator.scala:144)
        at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:253)
        at kafka.coordinator.group.GroupMetadata.inLock(GroupMetadata.scala:209)
        at kafka.coordinator.group.GroupCoordinator.handleJoinGroup(GroupCoordinator.scala:136)
        at kafka.server.KafkaApis.handleJoinGroupRequest(KafkaApis.scala:1389)
        at kafka.server.KafkaApis.handle(KafkaApis.scala:124)
        at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:69)
        at java.base/java.lang.Thread.run(Thread.java:834)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bchen225242 Boyang Chen
                Reporter:
                rocketraman Raman Gupta
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: