<?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 Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52059#M1114</link>
    <description>&lt;P&gt;Just tried now and it didn't work. Created a saved search with no results, still showing:&lt;/P&gt;

&lt;P&gt;Encountered an error while reading file '/xxxx/splunk/dispatch/scheduler_&lt;EM&gt;admin_dxxxxjcmVlbg&lt;/EM&gt;_RMD5edaa75325ad60f36_at_140999940_5127/results.csv.gz'.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:06:21 GMT</pubDate>
    <dc:creator>musskopf</dc:creator>
    <dc:date>2020-09-28T17:06:21Z</dc:date>
    <item>
      <title>Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52053#M1108</link>
      <description>&lt;P&gt;Hi guys,&lt;BR /&gt;
I have an issue with a saved (and scheduled) search with no result.&lt;BR /&gt;
If I schedule a search that returns no results and I try to get it with the command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| laodjob savedsearch="admin:app:label"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk returns following error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Encountered an error while reading file '$splunk_home$/var/run/splunk/dispatch/ .... /results.csv.gz'.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I try to change the time window where the search works (to "force" it to find some results), it works great.&lt;/P&gt;

&lt;P&gt;How can I be sure that Splunk creates the .cvs.gz file in any case even if the search does find no results? I can not dispatch a dashboard that returns a bad error like this!&lt;/P&gt;

&lt;P&gt;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2013 10:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52053#M1108</guid>
      <dc:creator>RiccardoV</dc:creator>
      <dc:date>2013-08-30T10:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52054#M1109</link>
      <description>&lt;P&gt;Add an extra line to the end of your scheduled search then 'something' will always be written regardless of the number of results obtained.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| append [|stats count |eval count="complete"| rename count as "info_search_marker" ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You'll then need to just get rid of this line when you retrieve the results later.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| fields - info_search_marker
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Sep 2013 02:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52054#M1109</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2013-09-16T02:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52055#M1110</link>
      <description>&lt;P&gt;thanks A LOT! It works like a charm!&lt;BR /&gt;
Then, you confirm that is a known issue that Splunk doesn't create a results.csv.gz file if the scheduled search returns no results?&lt;BR /&gt;
thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2013 10:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52055#M1110</guid>
      <dc:creator>RiccardoV</dc:creator>
      <dc:date>2013-09-16T10:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52056#M1111</link>
      <description>&lt;P&gt;I was having similar issue here, Splunk doesn't create the result file, if nothing is returned... It's a shame as only adds coding overhead on something should be straight-forward. Anyway, thanks for the tip!&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 22:19:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52056#M1111</guid>
      <dc:creator>musskopf</dc:creator>
      <dc:date>2014-07-06T22:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52057#M1112</link>
      <description>&lt;P&gt;Please try to add "events=true" as an argument of the loadjob command. Splunk will not return such error even when no events returned for the savedsearch&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 06:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52057#M1112</guid>
      <dc:creator>chanst2</dc:creator>
      <dc:date>2014-07-16T06:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52058#M1113</link>
      <description>&lt;P&gt;thanks, I'll try asap!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 07:18:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52058#M1113</guid>
      <dc:creator>RiccardoV</dc:creator>
      <dc:date>2014-07-16T07:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52059#M1114</link>
      <description>&lt;P&gt;Just tried now and it didn't work. Created a saved search with no results, still showing:&lt;/P&gt;

&lt;P&gt;Encountered an error while reading file '/xxxx/splunk/dispatch/scheduler_&lt;EM&gt;admin_dxxxxjcmVlbg&lt;/EM&gt;_RMD5edaa75325ad60f36_at_140999940_5127/results.csv.gz'.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52059#M1114</guid>
      <dc:creator>musskopf</dc:creator>
      <dc:date>2020-09-28T17:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Saved (scheduled) searches with no results: Encountered an error while reading file results.csv.gz</title>
      <link>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52060#M1115</link>
      <description>&lt;P&gt;I just tried to upload my screen shot, but too bad that my karma is &amp;lt;60 so that I couldn't upload.&lt;/P&gt;

&lt;P&gt;When I issued this search command in the Splunk search bar&lt;BR /&gt;
|loadjob events=true savedSearch="admin:xxx:yyy", I got "No results found." as a normal search without any events returned. However, when I issued |loadjob  savedSearch="admin:xxx:yyy", I got "Encountered an error while reading file '/aaa/var/run/splunk/dispatch/scheduler__admin_bbb_at_1405558800_3192/results.csv.gz'."&lt;/P&gt;

&lt;P&gt;In my case, this "events=true" works in both the search view and a dashboard panel&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Saved-scheduled-searches-with-no-results-Encountered-an-error/m-p/52060#M1115</guid>
      <dc:creator>chanst2</dc:creator>
      <dc:date>2020-09-28T17:06:29Z</dc:date>
    </item>
  </channel>
</rss>

