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

Error: NOT_LEADER_FOR_PARTITION leads to NPE

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.0.0
    • 1.0.1
    • consumer
    • None

    Description

      One of our nodes was dead. Then the second one tooks all responsibility.

      But streamming aplication in the meanwhile crashed due to NPE caused by Error: NOT_LEADER_FOR_PARTITION.

      The stack trace is below.

       

      Is it something expected?

       

      2018-01-17 11:47:21 [my] [WARN ] Sender:251 - [Producer ...2018-01-17 11:47:21 [my] [WARN ] Sender:251 - [Producer clientId=restreamer-my-fef07ca9-b067-45c0-a5af-68b5a1730dac-StreamThread-1-producer] Got error produce response with correlation id 768962 on topic-partition my_internal_topic-5, retrying (9 attempts left). Error: NOT_LEADER_FOR_PARTITION
      2018-01-17 11:47:21 [my] [WARN ] Sender:251 - [Producer clientId=restreamer-my-fef07ca9-b067-45c0-a5af-68b5a1730dac-StreamThread-1-producer] Got error produce response with correlation id 768962 on topic-partition my_internal_topic-7, retrying (9 attempts left). Error: NOT_LEADER_FOR_PARTITION
      2018-01-17 11:47:21 [my] [ERROR] AbstractCoordinator:296 - [Consumer clientId=restreamer-my-fef07ca9-b067-45c0-a5af-68b5a1730dac-StreamThread-1-consumer, groupId=restreamer-my] Heartbeat thread for group restreamer-my failed due to unexpected error
      java.lang.NullPointerException: null
              at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:436) ~[my-restreamer.jar:?]
              at org.apache.kafka.common.network.Selector.poll(Selector.java:395) ~[my-restreamer.jar:?]
              at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:460) ~[my-restreamer.jar:?]
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:238) ~[my-restreamer.jar:?]
              at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.pollNoWakeup(ConsumerNetworkClient.java:275) ~[my-restreamer.jar:?]
              at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$HeartbeatThread.run(AbstractCoordinator.java:934) [my-restreamer.jar:?]
      
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            habdank Seweryn Habdank-Wojewodzki
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment