conduktor.io ↗

Kafka Exception InvalidStateStoreException

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

Indicates that there was a problem when trying to access a StateStore StateStore. InvalidStateStoreException is not thrown directly but only its following subclasses.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.streams.errors.InvalidStateStoreException: The state store, my-key-value-store, may have migrated to another instance. at org.apache.kafka.streams.state.internals.StreamThreadStateStoreProvider.stores(StreamThreadStateStoreProvider.java:85) at org.apache.kafka.streams.state.internals.QueryableStoreProvider.getStore(QueryableStoreProvider.java:61) at org.apache.kafka.streams.KafkaStreams.store(KafkaStreams.java:1182) at com.example.streams.QueryService.lookup(QueryService.java:44)

Diagnostic Commands

kafka-topics.sh --bootstrap-server localhost:9092 --describe --topic <application.id>-<store>-changelog # check RF vs min.insync.replicas on the changelog kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group <application.id> # see if the group is stuck rebalancing

Related

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

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