kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Cabanilla <ca...@datadoghq.com>
Subject Re: python brond - brod.base.OffsetOutOfRange: Code: 1
Date Mon, 03 Mar 2014 16:19:49 GMT
It means that the offset you're requesting doesn't exist. Since you're
asking for offset 0, it's likely that that offset has already been expired
and you'll need to ask for a later offset. You can make an offsets request
using the EARLIEST_OFFSET constant to get the earliest offset that still
exists.


On Sat, Mar 1, 2014 at 5:09 AM, David Montgomery
<davidmontgomery@gmail.com>wrote:

> How do I fix?
>
> In python....
>
> for offset, message in brod.Kafka.fetch(kafka,pixel_topic, offset=0):
>         print message
>
>
>  File
>
> "/usr/local/lib/python2.7/dist-packages/brod-0.3.2-py2.7.egg/brod/blocking.py",
> line 70, in _read
>     return callback(output)
>   File
> "/usr/local/lib/python2.7/dist-packages/brod-0.3.2-py2.7.egg/brod/base.py",
> line 588, in _read_response
>     raise error_codes.get(error_code, UnknownError)('Code:
> {0}'.format(error_code))
> brod.base.OffsetOutOfRange: Code: 1
>
>
> In kafka logs...
>
>
> [2014-03-01 09:58:30,886] INFO Closing socket connection to /
> 222.127.178.107.
> (kafka.network.Processor)
> [2014-03-01 10:01:29,518] INFO Closing socket connection to /
> 222.127.178.107.
> (kafka.network.Processor)
> [2014-03-01 10:01:41,473] ERROR error when processing request
> FetchRequest(topic:topic-pixel, part:0 offset:0 maxSize:1048576)
> (kafka.server.KafkaRequestHandlers)
> kafka.common.OffsetOutOfRangeException: offset 0 is out of range
>     at kafka.log.Log$.findRange(Log.scala:46)
>     at kafka.log.Log.read(Log.scala:264)
>     at
>
> kafka.server.KafkaRequestHandlers.kafka$server$KafkaRequestHandlers$$readMessageSet(KafkaRequestHandlers.scala:112)
>     at
>
> kafka.server.KafkaRequestHandlers.handleFetchRequest(KafkaRequestHandlers.scala:92)
>     at
>
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$2.apply(KafkaRequestHandlers.scala:39)
>     at
>
> kafka.server.KafkaRequestHandlers$$anonfun$handlerFor$2.apply(KafkaRequestHandlers.scala:39)
>     at kafka.network.Processor.handle(SocketServer.scala:296)
>     at kafka.network.Processor.read(SocketServer.scala:319)
>     at kafka.network.Processor.run(SocketServer.scala:214)
>     at java.lang.Thread.run(Thread.java:744)
> [2014-03-01 10:01:41,573] INFO Closing socket connection to /
> 222.127.178.107.
> (kafka.network.Processor)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message