conduktor.io ↗

Kafka Exception StateStoreNotAvailableException

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

Indicates that the state store being queried is already closed. This could happen when Kafka Streams is in PENDING_SHUTDOWN PENDING_SHUTDOWN or NOT_RUNNING NOT_RUNNING or ERROR ERROR state.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.StateStoreNotAvailableException: State store is not available anymore and may have been migrated to another instance; it cannot be queried. at org.apache.kafka.streams.state.internals.StreamThreadStateStoreProvider.stores(StreamThreadStateStoreProvider.java:70) at org.apache.kafka.streams.state.internals.QueryableStoreProvider.getStore(QueryableStoreProvider.java:75) at org.apache.kafka.streams.KafkaStreams.store(KafkaStreams.java:1804) at com.example.QueryService.lookup(QueryService.java:42)

Diagnostic Commands

kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic my-app-store-changelog # check replication factor vs min.insync.replicas kafka-streams-application-reset.sh --application-id my-app --bootstrap-server localhost:9092 # before restarting an instance whose local state is suspect

Related

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

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