<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to handle kafka.common.OffsetOutOfRangeException in Storm ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-kafka-common-OffsetOutOfRangeException-in/m-p/95544#M8894</link>
    <description>&lt;P&gt;Make sure you set the following config in kafkaspout's Spoutconfig&lt;/P&gt;&lt;PRE&gt;spoutConfig.startOffsetTime = kafka.api.OffsetRequest.EarliestTime();&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://github.com/apache/storm/tree/master/external/storm-kafka" target="_blank"&gt;https://github.com/apache/storm/tree/master/external/storm-kafka&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Apart from that&lt;/P&gt;&lt;P&gt;1. Make sure you log.retention.hours is long enough to retain topic data&lt;/P&gt;&lt;P&gt;2. Check kafka topic offsets&lt;/P&gt;&lt;P&gt;  bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list hostname:6667 --topic topic_name --time -1&lt;/P&gt;&lt;P&gt;the above command will give you latest offset into kafka topic and now you need to check if storm kafkaspout is catching up.&lt;/P&gt;&lt;P&gt;2.1 login into zookeeper shell&lt;/P&gt;&lt;P&gt;2.2 ls /zkroot/id (zkroot is the one configured in spoutconfig and id from spoutconfig) as well&lt;/P&gt;&lt;P&gt;2.3 get /zkroot/id/topic_name/part_0 will give you a json structure with key "offset" this will tell you how far you read into topic and also how far you are behind reading the latest data.&lt;/P&gt;&lt;P&gt;If its too far apart and if log.retention.hours hit you kafkaspout might be requesting for older offset which might have been deleted.&lt;/P&gt;</description>
    <pubDate>Sat, 17 Oct 2015 06:27:49 GMT</pubDate>
    <dc:creator>schintalapani</dc:creator>
    <dc:date>2015-10-17T06:27:49Z</dc:date>
    <item>
      <title>How to handle kafka.common.OffsetOutOfRangeException in Storm ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-kafka-common-OffsetOutOfRangeException-in/m-p/95543#M8893</link>
      <description>&lt;P&gt;I am getting following error with Storm topology failing to read the kafka as the data from kafka topic as  data gets deleted based on retention(Size). Ideally we want to have storm to move (fast forward) to the first available message. Is there anyway to do this in Storm ?&lt;/P&gt;&lt;P&gt;[2015-10-13 14:12:28,204] ERROR [KafkaApi-2] Error when processing fetch request for partition [&amp;lt;topic_name&amp;gt;,0] offset 4231749539 from consumer with correlation id 0 (kafka.server.KafkaApis) 
kafka.common.OffsetOutOfRangeException: Request for offset 4231749539 but we only have log segments in the range 4255773954 to 4376049622. 
at kafka.log.Log.read(Log.scala:380) &lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 17:52:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-kafka-common-OffsetOutOfRangeException-in/m-p/95543#M8893</guid>
      <dc:creator>Jagatheeshr</dc:creator>
      <dc:date>2015-10-16T17:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle kafka.common.OffsetOutOfRangeException in Storm ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-kafka-common-OffsetOutOfRangeException-in/m-p/95544#M8894</link>
      <description>&lt;P&gt;Make sure you set the following config in kafkaspout's Spoutconfig&lt;/P&gt;&lt;PRE&gt;spoutConfig.startOffsetTime = kafka.api.OffsetRequest.EarliestTime();&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://github.com/apache/storm/tree/master/external/storm-kafka" target="_blank"&gt;https://github.com/apache/storm/tree/master/external/storm-kafka&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Apart from that&lt;/P&gt;&lt;P&gt;1. Make sure you log.retention.hours is long enough to retain topic data&lt;/P&gt;&lt;P&gt;2. Check kafka topic offsets&lt;/P&gt;&lt;P&gt;  bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list hostname:6667 --topic topic_name --time -1&lt;/P&gt;&lt;P&gt;the above command will give you latest offset into kafka topic and now you need to check if storm kafkaspout is catching up.&lt;/P&gt;&lt;P&gt;2.1 login into zookeeper shell&lt;/P&gt;&lt;P&gt;2.2 ls /zkroot/id (zkroot is the one configured in spoutconfig and id from spoutconfig) as well&lt;/P&gt;&lt;P&gt;2.3 get /zkroot/id/topic_name/part_0 will give you a json structure with key "offset" this will tell you how far you read into topic and also how far you are behind reading the latest data.&lt;/P&gt;&lt;P&gt;If its too far apart and if log.retention.hours hit you kafkaspout might be requesting for older offset which might have been deleted.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2015 06:27:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-handle-kafka-common-OffsetOutOfRangeException-in/m-p/95544#M8894</guid>
      <dc:creator>schintalapani</dc:creator>
      <dc:date>2015-10-17T06:27:49Z</dc:date>
    </item>
  </channel>
</rss>

