<?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: Connection reset Error occurred while connect service.connect method in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352054#M5611</link>
    <description>&lt;P&gt;Connection reset &lt;A href="http://net-informations.com/java/net/socket.htm"&gt;socket&lt;/A&gt; error occurs when the opponent is forcibly terminated without calling close(). This  simply means that a TCP RST was received. TCP RST packet is that the remote side telling you the connection on which the previous TCP packet is sent is not recognized, maybe the connection has closed, maybe the port is not open, and something like these. A reset packet is simply one with no payload and with the RST bit set in the TCP header flags. There are several possible causes.&lt;/P&gt;

&lt;P&gt;The other end has deliberately reset the connection, in a way which I will not document here. It is rare, and generally incorrect, for application software to do this, but it is not unknown for commercial software.&lt;/P&gt;

&lt;P&gt;More commonly, it is caused by writing to a connection that the other end has already closed normally. In other words an application protocol error.&lt;/P&gt;

&lt;P&gt;It can also be caused by closing a socket when there is unread data in the socket receive buffer.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2019 06:58:36 GMT</pubDate>
    <dc:creator>creigelde</dc:creator>
    <dc:date>2019-12-17T06:58:36Z</dc:date>
    <item>
      <title>Connection reset Error occurred while connect service.connect method</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352050#M5607</link>
      <description>&lt;P&gt;Splunk DB connect Code:&lt;/P&gt;

&lt;P&gt;public static void connectSplunk(){ &lt;BR /&gt;
         ServiceArgs loginArgs = new ServiceArgs();&lt;BR /&gt;
         loginArgs.setUsername("XXXXX");&lt;BR /&gt;
         loginArgs.setPassword("yyyyyyy");&lt;BR /&gt;
         loginArgs.setHost("xxxx.yyyy.zzz.com");&lt;BR /&gt;
         loginArgs.setPort(8089);&lt;BR /&gt;
         loginArgs.setScheme("http");&lt;BR /&gt;
         Service service = Service.connect(loginArgs);&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;While Connect the Splunk with connect.service method getting below error. help to resolve &lt;BR /&gt;
Exception in thread "main" java.lang.RuntimeException: Connection reset&lt;BR /&gt;
    at com.splunk.HttpService.send(HttpService.java:469)&lt;BR /&gt;
    at com.splunk.Service.send(Service.java:1295)&lt;BR /&gt;
    at com.splunk.HttpService.post(HttpService.java:348)&lt;BR /&gt;
    at com.splunk.Service.login(Service.java:1124)&lt;BR /&gt;
    at com.splunk.Service.login(Service.java:1103)&lt;BR /&gt;
    at com.splunk.Service.connect(Service.java:189)&lt;BR /&gt;
    at com.sdn.core.sample.connectSplunk(sample.java:23)&lt;BR /&gt;
    at com.sdn.core.sample.main(sample.java:13)&lt;BR /&gt;
Caused by: java.net.SocketException: Connection reset&lt;BR /&gt;
    at java.net.SocketInputStream.read(SocketInputStream.java:210)&lt;BR /&gt;
    at java.net.SocketInputStream.read(SocketInputStream.java:141)&lt;BR /&gt;
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)&lt;BR /&gt;
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)&lt;BR /&gt;
    at java.io.BufferedInputStream.read(BufferedInputStream.java:345)&lt;BR /&gt;
    at sun.net.&lt;A href="http://www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)"&gt;www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)&lt;/A&gt;&lt;BR /&gt;
    at sun.net.&lt;A href="http://www.http.HttpClient.parseHTTP(HttpClient.java:647)"&gt;www.http.HttpClient.parseHTTP(HttpClient.java:647)&lt;/A&gt;&lt;BR /&gt;
    at sun.net.&lt;A href="http://www.http.HttpClient.parseHTTP(HttpClient.java:675)"&gt;www.http.HttpClient.parseHTTP(HttpClient.java:675)&lt;/A&gt;&lt;BR /&gt;
    at sun.net.&lt;A href="http://www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)"&gt;www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1569)&lt;/A&gt;&lt;BR /&gt;
    at sun.net.&lt;A href="http://www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)"&gt;www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)&lt;/A&gt;&lt;BR /&gt;
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)&lt;BR /&gt;
    at com.splunk.HttpService.send(HttpService.java:467)&lt;BR /&gt;
    ... 7 more&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 09:17:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352050#M5607</guid>
      <dc:creator>npbala_22</dc:creator>
      <dc:date>2018-03-14T09:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Connection reset Error occurred while connect service.connect method</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352051#M5608</link>
      <description>&lt;P&gt;Try adding this line: &lt;BR /&gt;
    service.login();&lt;/P&gt;

&lt;P&gt;After :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Service.connect(loginArgs);
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also refer:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/64423/connection-refused-what-may-be-the-root-cause.html"&gt;https://answers.splunk.com/answers/64423/connection-refused-what-may-be-the-root-cause.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 09:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352051#M5608</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-14T09:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Connection reset Error occurred while connect service.connect method</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352052#M5609</link>
      <description>&lt;P&gt;Am getting error on Service.connect(loginArgs); line.. Still getting same error&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:10:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352052#M5609</guid>
      <dc:creator>npbala_22</dc:creator>
      <dc:date>2018-03-14T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Connection reset Error occurred while connect service.connect method</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352053#M5610</link>
      <description>&lt;P&gt;import these classes:&lt;/P&gt;

&lt;P&gt;import com.splunk.HttpService;&lt;BR /&gt;
import com.splunk.SSLSecurityProtocol;&lt;/P&gt;

&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;HttpService.setSslSecurityProtocol( SSLSecurityProtocol.TLSv1_2 );&lt;/STRONG&gt;&lt;BR /&gt;
Map connectionArgs = new HashMap();&lt;BR /&gt;
connectionArgs.put("host", "localhost");&lt;BR /&gt;
connectionArgs.put("username", "admin");&lt;BR /&gt;
connectionArgs.put("password", "changeme");&lt;BR /&gt;
connectionArgs.put("port", 8089);&lt;BR /&gt;
connectionArgs.put("scheme", "https");&lt;BR /&gt;
Service service = Service.connect(connectionArgs);&lt;/P&gt;</description>
      <pubDate>Sun, 29 Apr 2018 18:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352053#M5610</guid>
      <dc:creator>shubhamgkale</dc:creator>
      <dc:date>2018-04-29T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Connection reset Error occurred while connect service.connect method</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352054#M5611</link>
      <description>&lt;P&gt;Connection reset &lt;A href="http://net-informations.com/java/net/socket.htm"&gt;socket&lt;/A&gt; error occurs when the opponent is forcibly terminated without calling close(). This  simply means that a TCP RST was received. TCP RST packet is that the remote side telling you the connection on which the previous TCP packet is sent is not recognized, maybe the connection has closed, maybe the port is not open, and something like these. A reset packet is simply one with no payload and with the RST bit set in the TCP header flags. There are several possible causes.&lt;/P&gt;

&lt;P&gt;The other end has deliberately reset the connection, in a way which I will not document here. It is rare, and generally incorrect, for application software to do this, but it is not unknown for commercial software.&lt;/P&gt;

&lt;P&gt;More commonly, it is caused by writing to a connection that the other end has already closed normally. In other words an application protocol error.&lt;/P&gt;

&lt;P&gt;It can also be caused by closing a socket when there is unread data in the socket receive buffer.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 06:58:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Connection-reset-Error-occurred-while-connect-service-connect/m-p/352054#M5611</guid>
      <dc:creator>creigelde</dc:creator>
      <dc:date>2019-12-17T06:58:36Z</dc:date>
    </item>
  </channel>
</rss>

