conduktor.io ↗

Kafka Exception OffsetOutOfRangeException

org.apache.kafka.common.errors.OffsetOutOfRangeException
Non-retriable Consumer

No reset policy has been defined, and the offsets for these partitions are either larger or smaller than the range of offsets the server has for the given partition.

Common Causes

Solutions

Example Stack Trace

org.apache.kafka.common.errors.OffsetOutOfRangeException: The requested offset is not within the range of offsets maintained by the server.

Diagnostic Commands

# Describe consumer group offsets and lag kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group <group> --describe # Check earliest and latest offsets for the topic kafka-get-offsets.sh --bootstrap-server localhost:9092 --topic <topic> --time -2 # Check latest offsets kafka-get-offsets.sh --bootstrap-server localhost:9092 --topic <topic> --time -1

Related

Protocol error: OFFSET_OUT_OF_RANGE (code 1)

Related Consumer exceptions: CommitFailedException · CoordinatorLoadInProgressException · CoordinatorNotAvailableException · FencedInstanceIdException · FencedMemberEpochException · GroupMaxSizeReachedException · IllegalGenerationException · InvalidGroupIdException

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