Matthias J. Sax created KAFKA-16241: ---------------------------------------
Summary: Kafka Streams hits IllegalStateException trying to recycle a task Key: KAFKA-16241 URL: https://issues.apache.org/jira/browse/KAFKA-16241 Project: Kafka Issue Type: Bug Components: streams Reporter: Matthias J. Sax Running with EOS-v2 (not sure if relevant or not) and hitting: {code:java} [2024-02-08 20:57:42,325] ERROR [i-0fede2697f39580f9-StreamThread-1] stream-thread [i-0fede2697f39580f9-StreamThread-1] Failed to recycle task 1_0 cleanly. Attempting to close remaining tasks before re-throwing: (org.apache.kafka.streams.processor.internals.TaskManager) java.lang.IllegalStateException: Illegal state RESTORING while recycling active task 1_0 at org.apache.kafka.streams.processor.internals.StreamTask.prepareRecycle(StreamTask.java:582) at org.apache.kafka.streams.processor.internals.StandbyTaskCreator.createStandbyTaskFromActive(StandbyTaskCreator.java:125) at org.apache.kafka.streams.processor.internals.TaskManager.convertActiveToStandby(TaskManager.java:675) at org.apache.kafka.streams.processor.internals.TaskManager.closeAndRecycleTasks(TaskManager.java:651) at org.apache.kafka.streams.processor.internals.TaskManager.handleAssignment(TaskManager.java:350) at org.apache.kafka.streams.processor.internals.StreamsPartitionAssignor.onAssignment(StreamsPartitionAssignor.java:1381) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.invokeOnAssignment(ConsumerCoordinator.java:315) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:469) at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:478) at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:389) at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:564) at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1220) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1179) at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1159) at org.apache.kafka.streams.processor.internals.StreamThread.pollRequests(StreamThread.java:1014) at org.apache.kafka.streams.processor.internals.StreamThread.pollPhase(StreamThread.java:954) at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:766) at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:617) at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:579) {code} Logs of all three KS instances attached. -- This message was sent by Atlassian Jira (v8.20.10#820010)