conduktor.io ↗

Kafka Exception StreamsStoppedException

org.apache.kafka.streams.errors.StreamsStoppedException
Non-retriable Streams

Indicates that Kafka Streams is in a terminating or terminal state, such as PENDING_SHUTDOWN,PENDING_ERROR,NOT_RUNNING, or ERROR. This Streams instance will need to be discarded and replaced before it can serve queries. The caller may wish to query a different instance.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.StreamsStoppedException: KafkaStreams is in a terminal state and can no longer serve queries; current state is ERROR at org.apache.kafka.streams.KafkaStreams.validateIsRunningOrRebalancing(KafkaStreams.java:1452) at org.apache.kafka.streams.KafkaStreams.store(KafkaStreams.java:1798) at com.example.QueryService.lookup(QueryService.java:43)

Diagnostic Commands

kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-app # confirm this instance's partitions were reassigned to a surviving one. This instance is terminal — restart the JVM/pod after fixing the root cause; do NOT run application-reset just to relaunch one instance (it deletes internal topics and forces a full replay). kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group my-app # verify partitions got reassigned to a surviving instance

Related

Related Streams exceptions: BrokerNotFoundException · InternalTopicsAlreadySetupException · InvalidStateStoreException · InvalidStateStorePartitionException · LockException · MisconfiguredInternalTopicException · MissingInternalTopicsException · MissingSourceTopicException

Hitting StreamsStoppedException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.