<?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>topic WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188742#M37639</link>
    <description>&lt;P&gt;splunkd.log output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;05-25-2014 19:58:26.249 +0000 INFO  WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file='&amp;lt;file&amp;gt;'.

05-25-2014 19:58:58.155 +0000 INFO  BatchReader - Removed from queue file='&amp;lt;file&amp;gt;'.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The file is a couple hundred MB's.&lt;/P&gt;

&lt;P&gt;Scenario, the file is scp to the forwarder server. Data is not viewable.&lt;/P&gt;

&lt;P&gt;What could cause this error, as it has happened repeatedly with the same file.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2014 18:56:33 GMT</pubDate>
    <dc:creator>ben_leung</dc:creator>
    <dc:date>2014-06-04T18:56:33Z</dc:date>
    <item>
      <title>WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188742#M37639</link>
      <description>&lt;P&gt;splunkd.log output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;05-25-2014 19:58:26.249 +0000 INFO  WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file='&amp;lt;file&amp;gt;'.

05-25-2014 19:58:58.155 +0000 INFO  BatchReader - Removed from queue file='&amp;lt;file&amp;gt;'.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The file is a couple hundred MB's.&lt;/P&gt;

&lt;P&gt;Scenario, the file is scp to the forwarder server. Data is not viewable.&lt;/P&gt;

&lt;P&gt;What could cause this error, as it has happened repeatedly with the same file.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 18:56:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188742#M37639</guid>
      <dc:creator>ben_leung</dc:creator>
      <dc:date>2014-06-04T18:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188743#M37640</link>
      <description>&lt;P&gt;I would have to scp the file again in order for splunk to index it. Why did the first time not work?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 19:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188743#M37640</guid>
      <dc:creator>ben_leung</dc:creator>
      <dc:date>2014-06-04T19:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188744#M37641</link>
      <description>&lt;P&gt;As soon as Splunk sees the file in the directory, it tries to start indexing. My guess is that Splunk started to index before any data was actually written to the file. &lt;/P&gt;

&lt;P&gt;It also appears that you were copying the file to a directory for splunk to "index once" or "batch load."&lt;BR /&gt;
So Splunk will only take one shot at files in this directory.&lt;/P&gt;

&lt;P&gt;If you were monitoring the directory instead, it probably would have worked. Here are a couple of alternatives:&lt;/P&gt;

&lt;P&gt;1 - Use monitor&lt;/P&gt;

&lt;P&gt;Use &lt;CODE&gt;[monitor://]&lt;/CODE&gt; instead of batch in your &lt;CODE&gt;inputs.conf&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;
Write a script to remove the files from the directory after 24 hours or 7 days or whatever makes sense.&lt;/P&gt;

&lt;P&gt;2 - Use two directories&lt;/P&gt;

&lt;P&gt;Leave the &lt;CODE&gt;batch&lt;/CODE&gt; in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;scp&lt;/CODE&gt; the file to a different directory, then &lt;CODE&gt;mv&lt;/CODE&gt; it to the batch directory. Otherwise, Splunk may hit EOF before the complete file is copied.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 20:15:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188744#M37641</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-04T20:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: WatchedFile - File too small to check seekcrc, probably truncated.  Will re-read entire file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188745#M37642</link>
      <description>&lt;P&gt;Hi lguinn, &lt;/P&gt;

&lt;P&gt;I'm getting bunch of there messages on our UFs.....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INFO  WatchedFile -File too small to check seekcrc, probably truncated.  Will re-read entire file=.'&amp;lt;filepath&amp;gt;'

INFO  WatchedFile - Logfile truncated while open, original pathname file=.'&amp;lt;filepath&amp;gt;'. , will begin reading from start.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have my inputs.conf in here i did tried with followTail and initCrcLength which doesn't work to get rid of the above messages..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [monitor:///opt/app/ws/server/*/log/server.log]
 sourcetype=log4j
 crcSalt = &amp;lt;SOURCE&amp;gt;
 index=testenv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The actual path of the monitor stanza would include..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/app/ws/server/*/log/server.log]

/opt/app/ws/server/ra_JVM00/log/server.log
/opt/app/ws/server/ra_JVM01/log/server.log
/opt/app/ws/server/pr_INS00/log/server.log
/opt/app/ws/server/pr_INS02/log/server.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The logs get rotated/saved as e.g:/opt/app/ws/server/ra_JVM00/log/server.log.2016-05-08, i don't think splunk will read this as we did not give that in monitor stanza.&lt;/P&gt;

&lt;P&gt;Can you please shed some light on this...?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 15:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/WatchedFile-File-too-small-to-check-seekcrc-probably-truncated/m-p/188745#M37642</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2016-05-09T15:07:08Z</dc:date>
    </item>
  </channel>
</rss>

