<?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 Accessing HEC with Java getting error  Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088 in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/490937#M8821</link>
    <description>&lt;P&gt;Using Java Class HttpEventCollectorLoggingHandler, with properties file, implementing the HttpEventCollectorErrorHandler.&lt;/P&gt;
&lt;P&gt;The Reply; Error Code and Error text from HttpEventCollectorErrorHandler is:&lt;/P&gt;
&lt;P&gt;Reply: Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088&lt;BR /&gt;ErrorCode: -1&lt;BR /&gt;ErrorText: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 9 path $&lt;BR /&gt;Failed write of Log Event: Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088&lt;BR /&gt;HttpEventCollectorErrorHandler&lt;/P&gt;
&lt;P&gt;Any assistance would be appreciated, Thanks Steve.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 18:24:13 GMT</pubDate>
    <dc:creator>steveIMS</dc:creator>
    <dc:date>2020-06-07T18:24:13Z</dc:date>
    <item>
      <title>Accessing HEC with Java getting error  Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/490937#M8821</link>
      <description>&lt;P&gt;Using Java Class HttpEventCollectorLoggingHandler, with properties file, implementing the HttpEventCollectorErrorHandler.&lt;/P&gt;
&lt;P&gt;The Reply; Error Code and Error text from HttpEventCollectorErrorHandler is:&lt;/P&gt;
&lt;P&gt;Reply: Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088&lt;BR /&gt;ErrorCode: -1&lt;BR /&gt;ErrorText: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 9 path $&lt;BR /&gt;Failed write of Log Event: Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088&lt;BR /&gt;HttpEventCollectorErrorHandler&lt;/P&gt;
&lt;P&gt;Any assistance would be appreciated, Thanks Steve.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 18:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/490937#M8821</guid>
      <dc:creator>steveIMS</dc:creator>
      <dc:date>2020-06-07T18:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing HEC with Java getting error  Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/575596#M8822</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the same error.:&lt;/P&gt;&lt;BLOCKQUOTE&gt;om.splunk.logging.HttpEventCollectorErrorHandler$ServerErrorException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 7 path $&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Something new about it?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 08:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/575596#M8822</guid>
      <dc:creator>struffieux</dc:creator>
      <dc:date>2021-11-19T08:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing HEC with Java getting error  Failed to connect to hecdevsplunk.company.com/11.54.0.234:8088</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/575610#M8823</link>
      <description>&lt;P&gt;It seems in case of error by send event that HttpEventCollectorSender will instantiate a ServerErrorException:&lt;/P&gt;&lt;LI-CODE lang="java"&gt; HttpEventCollectorErrorHandler.error(events, new ServerErrorException(ex.getMessage()));&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And ServerErrorException try to parse the message as JSON (!):&lt;/P&gt;&lt;LI-CODE lang="java"&gt;        public ServerErrorException(String serverReply) {
            this.reply = serverReply;

            try {
                JsonObject json = JsonParser.parseString(serverReply).getAsJsonObject();
                this.errorCode = json.get("code").getAsLong();
                this.errorText = json.get("text").getAsString();
            } catch (Exception var3) {
                this.errorText = var3.getMessage();
            }

        }&lt;/LI-CODE&gt;&lt;P&gt;So this error is not the original error.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 10:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Accessing-HEC-with-Java-getting-error-Failed-to-connect-to/m-p/575610#M8823</guid>
      <dc:creator>struffieux</dc:creator>
      <dc:date>2021-11-19T10:18:16Z</dc:date>
    </item>
  </channel>
</rss>

