<?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: Search  Returns Exit Code -2 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55396#M13523</link>
    <description>&lt;P&gt;I had this same error... I tried a number of troubleshooting steps, but by the time I upped the debug level it randomly started working again (after failing for more than a day). I assume that timing is just coincidental. An upgrade to 6.0.1 didn't resolve it, and restarting the entire environment didn't resolve it. Also deleting and re-adding the search peer didn't resolve it. After the last restart, it still failed.. and then randomly begun working again.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2014 19:30:13 GMT</pubDate>
    <dc:creator>David</dc:creator>
    <dc:date>2014-01-31T19:30:13Z</dc:date>
    <item>
      <title>Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55393#M13520</link>
      <description>&lt;P&gt;Here's the situation. I have an international server. When trying to search it as a distributed peer, it exits with this message.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[REMOTE_WAN_HOST] Search process did not exit cleanly, exit_code=-2, description="exited with code -2". Please look in search.log for this peer in the Job Inspector for more info.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So I take a look in the peer's dispatch directory for the search log. I find this.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
08-27-2013 00:56:51.884 INFO  UserManager - Setting user context: USER&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'admin'&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'ess_admin'&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'ess_analyst'&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'ess_user'&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'power'&lt;BR /&gt;
08-27-2013 00:56:51.884 WARN  AuthorizationManager - Unknown role 'user'&lt;BR /&gt;
08-27-2013 00:56:51.884 ERROR UserManagerPro - user="USER" had no roles&lt;BR /&gt;
08-27-2013 00:56:51.884 ERROR UserManager - Error while setting user context: user="USER" had no roles&lt;BR /&gt;
08-27-2013 00:56:51.884 INFO  UserManager - Done setting user context: NULL -&amp;gt; NULL&lt;BR /&gt;
08-27-2013 00:56:51.884 INFO  UserManager - Unwound user context: NULL -&amp;gt; NULL&lt;BR /&gt;
08-27-2013 00:56:51.884 ERROR dispatchRunner - RunDispatch::runDispatchThread threw error: Application does not exist: search&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;All of these roles and the USER exist in exactly the same way as on the search head. I'm at a loss on why it's not working correctly. &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:42:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55393#M13520</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2020-09-28T14:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55394#M13521</link>
      <description>&lt;P&gt;Hey..I am facing similar issue, were you able to resolved it?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2013 16:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55394#M13521</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-27T16:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55395#M13522</link>
      <description>&lt;P&gt;could this be the same issue? &lt;A href="http://answers.splunk.com/answers/84199/distributed-search-application-does-not-exist-search"&gt;http://answers.splunk.com/answers/84199/distributed-search-application-does-not-exist-search&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2013 16:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55395#M13522</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-12-27T16:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55396#M13523</link>
      <description>&lt;P&gt;I had this same error... I tried a number of troubleshooting steps, but by the time I upped the debug level it randomly started working again (after failing for more than a day). I assume that timing is just coincidental. An upgrade to 6.0.1 didn't resolve it, and restarting the entire environment didn't resolve it. Also deleting and re-adding the search peer didn't resolve it. After the last restart, it still failed.. and then randomly begun working again.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2014 19:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55396#M13523</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2014-01-31T19:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55397#M13524</link>
      <description>&lt;P&gt;Few places you can check.&lt;BR /&gt;
Search peers are running with inconsistency version.&lt;BR /&gt;
Check search peers status .&lt;BR /&gt;
ask user and that job/lookup table not had right permissions or not exist all over the places.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2014 20:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55397#M13524</guid>
      <dc:creator>brod_geico</dc:creator>
      <dc:date>2014-12-11T20:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search  Returns Exit Code -2</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55398#M13525</link>
      <description>&lt;P&gt;check this url, i had similar issues then i found version mismatch on SH peers.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/192592/search-process-did-not-exit-cleanly-exit-code255-d.html#answer-195456"&gt;http://answers.splunk.com/answers/192592/search-process-did-not-exit-cleanly-exit-code255-d.html#answer-195456&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Dec 2014 15:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-Returns-Exit-Code-2/m-p/55398#M13525</guid>
      <dc:creator>brod_geico</dc:creator>
      <dc:date>2014-12-12T15:05:32Z</dc:date>
    </item>
  </channel>
</rss>

