<?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: Does Splunk free license allow usage Splunk java SDK? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37704#M444</link>
    <description>&lt;P&gt;I got developer license as well but still I can't connect to Splunk server. The authentication fails!! I couldn't find anything on the web except connecting to "localhost" which is not my case in here.&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2013 23:04:56 GMT</pubDate>
    <dc:creator>nimakaveh</dc:creator>
    <dc:date>2013-05-20T23:04:56Z</dc:date>
    <item>
      <title>Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37700#M440</link>
      <description>&lt;P&gt;Based on my research free license doesn't have authentication process. I want to get connected to Splunk through java SDK but I am getting the following error. And this is my code:&lt;/P&gt;

&lt;P&gt;Note: I am running Splunk on a server not localhost.&lt;/P&gt;

&lt;P&gt;public static void main(String[] args) {&lt;BR /&gt;
        // TODO Auto-generated method stub&lt;BR /&gt;
        Map&lt;STRING&gt; connectionArgs = new HashMap&lt;STRING&gt;();&lt;BR /&gt;
        connectionArgs.put("host", "MY SERVER");&lt;BR /&gt;
        connectionArgs.put("username", "&lt;STRONG&gt;&lt;EM&gt;");&lt;BR /&gt;
        connectionArgs.put("password", "&lt;/EM&gt;&lt;/STRONG&gt;*");&lt;BR /&gt;
        connectionArgs.put("port", 8000);&lt;BR /&gt;
        connectionArgs.put("scheme", "https");&lt;BR /&gt;
        try&lt;BR /&gt;
        {&lt;BR /&gt;
        // will login and save the session key which gets put in the HTTP Authorization header&lt;BR /&gt;
        Service splunkService = Service.connect(connectionArgs); &lt;BR /&gt;
    }&lt;/STRING&gt;&lt;/STRING&gt;&lt;/P&gt;

&lt;P&gt;This is the error:&lt;BR /&gt;
[Fatal Error] :1:1: Content is not allowed in prolog.&lt;BR /&gt;
com.splunk.HttpException: HTTP 400&lt;BR /&gt;
    at com.splunk.HttpException.create(HttpException.java:59)&lt;BR /&gt;
    at com.splunk.HttpService.send(HttpService.java:355)&lt;BR /&gt;
    at com.splunk.Service.send(Service.java:1211)&lt;BR /&gt;
    at com.splunk.HttpService.post(HttpService.java:212)&lt;BR /&gt;
    at com.splunk.Service.login(Service.java:1044)&lt;BR /&gt;
    at com.splunk.Service.login(Service.java:1024)&lt;BR /&gt;
    at com.splunk.Service.connect(Service.java:161)&lt;BR /&gt;
    at com.splunk.demo.SplunkSSH.main(SplunkSSH.java:26)&lt;/P&gt;

&lt;P&gt;Also I added a setting to $SPLUNK_HOME/etc/system/local/server.conf and restarting; however, it didn't help!&lt;/P&gt;

&lt;P&gt;[general]&lt;BR /&gt;
allowRemoteLogin = always&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 01:55:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37700#M440</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-17T01:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37701#M441</link>
      <description>&lt;P&gt;Free license has Authentication process limited to first 60-days of its use. After that, the authentication process, background jobs, alerts, etc get disabled. However, your reports, dashboards and 500-MB limit continue to work.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 02:35:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37701#M441</guid>
      <dc:creator>miteshvohra</dc:creator>
      <dc:date>2013-05-17T02:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37702#M442</link>
      <description>&lt;P&gt;Not that I've used the Java SDK, but if it's anything like the other SDK's I'm pretty sure you don't want to connect to port 8000, which is the port used for the Splunk web interfaces on instances that have it enabled. The SDK's generally communicate with Splunk instances using the REST API, which is available via HTTPS on port 8089.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 08:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37702#M442</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-17T08:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37703#M443</link>
      <description>&lt;P&gt;Another option would be to request a developer license on the dev website:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/"&gt;http://dev.splunk.com/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2013 22:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37703#M443</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2013-05-17T22:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37704#M444</link>
      <description>&lt;P&gt;I got developer license as well but still I can't connect to Splunk server. The authentication fails!! I couldn't find anything on the web except connecting to "localhost" which is not my case in here.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 23:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37704#M444</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-20T23:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37705#M445</link>
      <description>&lt;P&gt;First - Confirm from Splunk UI that the license is correctly added.&lt;BR /&gt;
Second - Are you logging in with default credentials - admin/changeme? By default, Splunk doesn't allow remote login with default password.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 03:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37705#M445</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-05-21T03:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37706#M446</link>
      <description>&lt;P&gt;I checked and the license is correctly added. No I am not using default credentials, I am using my own username/pass which I use to login to Splunk.&lt;BR /&gt;
This is my code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;public static void main(String[] args) {
    // TODO Auto-generated method stub
    Map&amp;lt;String, Object&amp;gt; connectionArgs = new HashMap&amp;lt;String, Object&amp;gt;();
    connectionArgs.put("host", "MY SERVER");
    connectionArgs.put("username", "****");
    connectionArgs.put("password", "****");
    connectionArgs.put("port", 8000);
    connectionArgs.put("scheme", "https");
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 21:26:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37706#M446</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-21T21:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37707#M447</link>
      <description>&lt;P&gt;And you're sure you're really supposed to be using port 8000?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 21:27:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37707#M447</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-21T21:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37708#M448</link>
      <description>&lt;P&gt;Ayn is right. You should be connecting to port 8089, the default management port. 8000 is the web port that UI uses.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 21:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37708#M448</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-05-21T21:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37709#M449</link>
      <description>&lt;P&gt;I tried both ports none of them worked!&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 21:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37709#M449</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-21T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37710#M450</link>
      <description>&lt;P&gt;Have you confirmed that there is no firewall in place on the Splunk host?  Check which interface is listening on port 8089 (run netstat -an on the Splunk host)?  Is it 0.0.0.0:8089?  You can also try to telnet to port 8089 from the host that you're trying to run your Java app from, to see if you can connect that way.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 22:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37710#M450</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2013-05-21T22:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37711#M451</link>
      <description>&lt;P&gt;the result of  nestat -an&lt;/P&gt;

&lt;P&gt;tcp        0      0 0.0.0.0:8089                0.0.0.0:*                   LISTEN&lt;BR /&gt;&lt;BR /&gt;
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN&lt;BR /&gt;&lt;BR /&gt;
tcp        0      0 0.0.0.0:8000                0.0.0.0:*                   LISTEN      &lt;/P&gt;

&lt;P&gt;But when I telnet to port 8089 from my machine it doesn't work&lt;BR /&gt;
nimakaveh$ telnet MYSERVER 8089&lt;BR /&gt;
Trying 172.23.4.205...&lt;BR /&gt;
telnet: connect to address 172.23.4.205: Connection refused&lt;BR /&gt;
telnet: Unable to connect to remote host&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 22:29:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37711#M451</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-21T22:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37712#M452</link>
      <description>&lt;P&gt;Sounds like you have a firewall blocking port 8089, either on the host or on your network, in front of the host.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 22:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37712#M452</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2013-05-21T22:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37713#M453</link>
      <description>&lt;P&gt;I will check port 8089 on my host and will post the result here. Thanks for you help so far.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 22:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37713#M453</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-21T22:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk free license allow usage Splunk java SDK?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37714#M454</link>
      <description>&lt;P&gt;sbrant_splunk thanks for your help, it is working now. I had an issue with iptable and port 8089 was closed.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2013 00:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Does-Splunk-free-license-allow-usage-Splunk-java-SDK/m-p/37714#M454</guid>
      <dc:creator>nimakaveh</dc:creator>
      <dc:date>2013-05-23T00:18:44Z</dc:date>
    </item>
  </channel>
</rss>

