Thanks to visit codestin.com
Credit goes to github.com

Skip to content

OffsetOutOfRange Error #263

Closed
Closed
@jimmyislive

Description

@jimmyislive

I initially posted this to the kafka users group, but they suggested to post it here as I am using the python client:

I recently received a OffsetOutOfRange error in production while it was functioning properly for like 4-5 days.

In the kafka broker log:

[2014-11-03 21:39:25,658] ERROR [KafkaApi-8] Error when processing fetch request for partition [activity.stream,5] offset 7475239 from consumer with correlation id 69 (kafka.server.KafkaApis)
kafka.common.OffsetOutOfRangeException: Request for offset 7475239 but we only have log segments in the range 8014610 to 10227768.

And on the client side I saw:

Nov 03 21:39:25 INFO kafka consumer.py: Commit offset 10227769 in SimpleConsumer: group=ActivityStream, topic=activity.stream, partition=5
...
...
Nov 03 21:39:26 ERROR demux.consumer_stream consumer_stream.py: OffsetOutOfRangeError(FetchResponse(topic='activity.stream', partition=5, error=1, highwaterMark=-1, messages=<generator object _decode_message_set_iter at 0x3dcf870>),)

Why would the kafka client commit offset 10227769, and then, 1 second later, turn around and ask kafka for the offset 7475239?

We are using a fork with some minor modifications of the kafka-python client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions