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

NullPointerException in StreamTask

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.7.0
    • Component/s: streams
    • Labels:

      Description

      In our Kafka Streams application we have been experiencing a NullPointerException when deploying a new version of our application. This does not happen during a normal rolling restart.

      The exception is:

      Error caught during partition assignment, will abort the current process and re-throw at the end of rebalance","stack_trace":"java.lang.NullPointerException: nullError caught during partition assignment, will abort the current process and re-throw at the end of rebalance","stack_trace":"java.lang.NullPointerException: null at org.apache.kafka.streams.processor.internals.StreamTask.<init>(StreamTask.java:186) at org.apache.kafka.streams.processor.internals.StreamTask.<init>(StreamTask.java:115) at org.apache.kafka.streams.processor.internals.StreamThread$TaskCreator.createTask(StreamThread.java:352) at org.apache.kafka.streams.processor.internals.StreamThread$TaskCreator.createTask(StreamThread.java:310) at org.apache.kafka.streams.processor.internals.StreamThread$AbstractTaskCreator.createTasks(StreamThread.java:295) at org.apache.kafka.streams.processor.internals.TaskManager.addNewActiveTasks(TaskManager.java:160) at org.apache.kafka.streams.processor.internals.TaskManager.createTasks(TaskManager.java:120) at org.apache.kafka.streams.processor.internals.StreamsRebalanceListener.onPartitionsAssigned(StreamsRebalanceListener.java:77) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.invokePartitionsAssigned(ConsumerCoordinator.java:278) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:419) at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:439) at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:358) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:490) at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1275) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1243) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1173) at brave.kafka.clients.TracingConsumer.poll(TracingConsumer.java:86) at brave.kafka.clients.TracingConsumer.poll(TracingConsumer.java:80) at org.apache.kafka.streams.processor.internals.StreamThread.pollRequests(StreamThread.java:853) at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:753) at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:697) at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:670)
      

      And the relevant lines of code - https://github.com/apache/kafka/blob/2.5/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java#L184-L196

      I suspect "topology.source(partition.topic());" is returning null.

      Has anyone experienced this issue before? I suspect there is a problem with our topology but I can't replicate this on my machine so I can't tell.

       

        Attachments

          Activity

            People

            • Assignee:
              soarez Igor Soarez
              Reporter:
              brianforkan Brian Forkan

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment