<?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: Unable to connect to Splunk server via java sdk in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/478245#M16634</link>
    <description>&lt;P&gt;This means your request did not get a response within some (default) timeframe. The reasons that no response was received is likely to be one of:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;The IP/Hostname or port is incorrect&lt;/LI&gt;
&lt;LI&gt;The IP/Hostname or port (i.e service)
is down&lt;/LI&gt;
&lt;LI&gt;The IP/Hostname is taking longer than
your default timeout to respond&lt;/LI&gt;
&lt;LI&gt;You have a firewall that is blocking
requests or responses on whatever
port you are using&lt;/LI&gt;
&lt;LI&gt;You have a firewall that is blocking
requests to that particular host&lt;/LI&gt;
&lt;LI&gt;Your internet access is down&lt;/LI&gt;
&lt;LI&gt;Your live-server is down i.e in case
of "rest-API call".&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Also, if you're trying to connect insecurely to an endpoint, set the scheme to "http":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;serviceArgs.setScheme("http");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Nov 2019 04:42:05 GMT</pubDate>
    <dc:creator>anantcd</dc:creator>
    <dc:date>2019-11-05T04:42:05Z</dc:date>
    <item>
      <title>Unable to connect to Splunk server via java sdk</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/478244#M16633</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am trying to connect to Splunk (Search Head) via Java sdk.&lt;BR /&gt;
But I received connection timeout error: &lt;STRONG&gt;java.lang.RuntimeException: Connection timed out: connect&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HttpService.setSslSecurityProtocol(SSLSecurityProtocol.TLSv1_2);
ServiceArgs serviceArgs = new ServiceArgs();
serviceArgs.setHost("companysplunkSearchHead.net");  // without http
serviceArgs.setPort(8089);
serviceArgs.setUsername("user");
serviceArgs.setPassword("password");

Service service = Service.connect(serviceArgs);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Splunk instance is on &lt;STRONG&gt;OpenShift&lt;/STRONG&gt; ( I tried also to: create a new route for the port 8089 and also set allowRemoteLogin=always)&lt;BR /&gt;
But the problem of connectivity still persists.&lt;/P&gt;

&lt;P&gt;The same code works in local.&lt;/P&gt;

&lt;P&gt;Could you please help me?&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>Mon, 04 Nov 2019 17:10:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/478244#M16633</guid>
      <dc:creator>andrewpagans</dc:creator>
      <dc:date>2019-11-04T17:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Splunk server via java sdk</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/478245#M16634</link>
      <description>&lt;P&gt;This means your request did not get a response within some (default) timeframe. The reasons that no response was received is likely to be one of:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;The IP/Hostname or port is incorrect&lt;/LI&gt;
&lt;LI&gt;The IP/Hostname or port (i.e service)
is down&lt;/LI&gt;
&lt;LI&gt;The IP/Hostname is taking longer than
your default timeout to respond&lt;/LI&gt;
&lt;LI&gt;You have a firewall that is blocking
requests or responses on whatever
port you are using&lt;/LI&gt;
&lt;LI&gt;You have a firewall that is blocking
requests to that particular host&lt;/LI&gt;
&lt;LI&gt;Your internet access is down&lt;/LI&gt;
&lt;LI&gt;Your live-server is down i.e in case
of "rest-API call".&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Also, if you're trying to connect insecurely to an endpoint, set the scheme to "http":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;serviceArgs.setScheme("http");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2019 04:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/478245#M16634</guid>
      <dc:creator>anantcd</dc:creator>
      <dc:date>2019-11-05T04:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to Splunk server via java sdk</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/530113#M18249</link>
      <description>&lt;P&gt;I hope u resolved the issue,&lt;/P&gt;&lt;P&gt;I am also facing the same issue, could you please help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 16:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Unable-to-connect-to-Splunk-server-via-java-sdk/m-p/530113#M18249</guid>
      <dc:creator>adit</dc:creator>
      <dc:date>2020-11-19T16:49:31Z</dc:date>
    </item>
  </channel>
</rss>

