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

Error: NOT_LEADER_FOR_PARTITION leads to NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1
    • Component/s: consumer
    • Labels:
      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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: