<?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 Why am I getting &amp;quot;Status 401 call not properly authenticated&amp;quot; running a search using the Splunk Java SDK 1.4.0.0? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165679#M47099</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I am using Splunk java sdk 1.4.0.0 when I execute this query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;String QUERY = "search \"ab_exper\" index=my_apache | rex \".+cohort%7C(?&amp;lt;cohort&amp;gt;.+)%3Bcampaign%7C(?&amp;lt;campaign&amp;gt;.+)%3Brecipe%7C(?&amp;lt;recipe&amp;gt;.+)%3Bplatform.+\" | stats count(recipe) as recipe_count by campaign, recipe";

ServiceArgs loginArgs = new ServiceArgs();
        loginArgs.setUsername(user);
        loginArgs.setPassword(password);
        loginArgs.setHost(splunkHost);
        loginArgs.setPort(port);

        Service service = Service.connect(loginArgs);
        JobArgs jobArgs = new JobArgs();
        jobArgs.setExecutionMode(JobArgs.ExecutionMode.BLOCKING);
        jobArgs.put("earliest_time", dateFormat.format(new Date(from)));
        jobArgs.put("latest_time", dateFormat.format(new Date(to)));

        Job job = service.getJobs().create(QUERY, jobArgs);
        return parseForRawEntries(job);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I receive different errors : &lt;BR /&gt;
One of them is 401call not properly authenticated. (And I see [Fatal Error] :1:1: Premature end of file. in console)&lt;BR /&gt;
Another - unexpected end of file from server.&lt;BR /&gt;
Authentication is success and returns 200 status.&lt;/P&gt;

&lt;P&gt;What could be the problem?&lt;/P&gt;

&lt;P&gt;Thanks, Dmytro&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2015 10:23:14 GMT</pubDate>
    <dc:creator>dimitrkovalsky</dc:creator>
    <dc:date>2015-06-17T10:23:14Z</dc:date>
    <item>
      <title>Why am I getting "Status 401 call not properly authenticated" running a search using the Splunk Java SDK 1.4.0.0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165679#M47099</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I am using Splunk java sdk 1.4.0.0 when I execute this query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;String QUERY = "search \"ab_exper\" index=my_apache | rex \".+cohort%7C(?&amp;lt;cohort&amp;gt;.+)%3Bcampaign%7C(?&amp;lt;campaign&amp;gt;.+)%3Brecipe%7C(?&amp;lt;recipe&amp;gt;.+)%3Bplatform.+\" | stats count(recipe) as recipe_count by campaign, recipe";

ServiceArgs loginArgs = new ServiceArgs();
        loginArgs.setUsername(user);
        loginArgs.setPassword(password);
        loginArgs.setHost(splunkHost);
        loginArgs.setPort(port);

        Service service = Service.connect(loginArgs);
        JobArgs jobArgs = new JobArgs();
        jobArgs.setExecutionMode(JobArgs.ExecutionMode.BLOCKING);
        jobArgs.put("earliest_time", dateFormat.format(new Date(from)));
        jobArgs.put("latest_time", dateFormat.format(new Date(to)));

        Job job = service.getJobs().create(QUERY, jobArgs);
        return parseForRawEntries(job);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I receive different errors : &lt;BR /&gt;
One of them is 401call not properly authenticated. (And I see [Fatal Error] :1:1: Premature end of file. in console)&lt;BR /&gt;
Another - unexpected end of file from server.&lt;BR /&gt;
Authentication is success and returns 200 status.&lt;/P&gt;

&lt;P&gt;What could be the problem?&lt;/P&gt;

&lt;P&gt;Thanks, Dmytro&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 10:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165679#M47099</guid>
      <dc:creator>dimitrkovalsky</dc:creator>
      <dc:date>2015-06-17T10:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "Status 401 call not properly authenticated" running a search using the Splunk Java SDK 1.4.0.0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165680#M47100</link>
      <description>&lt;P&gt;It happens when I use earliest_time less than (current - 86400000L) (more than one day).&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 14:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165680#M47100</guid>
      <dc:creator>dimitrkovalsky</dc:creator>
      <dc:date>2015-06-23T14:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "Status 401 call not properly authenticated" running a search using the Splunk Java SDK 1.4.0.0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165681#M47101</link>
      <description>&lt;P&gt;I think that error is from when you are hitting splunk web and not splunkd.  Make sure you are going against the proper hostname and especially port.  Splunk web, on port 80 or 443 or 8000 isn't the same as talking to splunkd on port 8089.   &lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEFC"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEFC&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 14:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165681#M47101</guid>
      <dc:creator>jnicholsenernoc</dc:creator>
      <dc:date>2015-06-23T14:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "Status 401 call not properly authenticated" running a search using the Splunk Java SDK 1.4.0.0?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165682#M47102</link>
      <description>&lt;P&gt;I think that error is from when you are hitting splunk web and not splunkd. Make sure you are going against the proper hostname and especially port. Splunk web, on port 80 or 443 or 8000 isn't the same as talking to splunkd on port 8089.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/python-sdk/SP-CAAAEFC"&gt;http://dev.splunk.com/view/python-sdk/SP-CAAAEFC&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 17:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-quot-Status-401-call-not-properly-authenticated/m-p/165682#M47102</guid>
      <dc:creator>jnicholsenernoc</dc:creator>
      <dc:date>2015-06-23T17:18:07Z</dc:date>
    </item>
  </channel>
</rss>

