<?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 HTTP Event Collector: Getting error &amp;quot;HttpInputDataHandler - Parsing error&amp;quot;. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463905#M79999</link>
    <description>&lt;P&gt;I have Splunk set up as an HTTP Event Collector receiver and am seeing parsing errors in splunkd.log like: &lt;CODE&gt;ERROR HttpInputDataHandler - Parsing error&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;How do I resolve these?&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 00:58:56 GMT</pubDate>
    <dc:creator>rphillips_splk</dc:creator>
    <dc:date>2020-06-07T00:58:56Z</dc:date>
    <item>
      <title>HTTP Event Collector: Getting error "HttpInputDataHandler - Parsing error".</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463905#M79999</link>
      <description>&lt;P&gt;I have Splunk set up as an HTTP Event Collector receiver and am seeing parsing errors in splunkd.log like: &lt;CODE&gt;ERROR HttpInputDataHandler - Parsing error&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;How do I resolve these?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 00:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463905#M79999</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2020-06-07T00:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Getting error "HttpInputDataHandler - Parsing error".</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463906#M80000</link>
      <description>&lt;P&gt;You may see Parsing errors similar to the ones below , however the event does not show the client ip. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;03-17-2020 12:55:50.841 -0400 ERROR HttpInputDataHandler - Parsing error : Got unexpected null element while expecting event's raw text, totalRequestSize=133

05-29-2020 12:36:34.333 -0400 ERROR HttpInputDataHandler - Parsing error : Event field cannot be blank

05-29-2020 12:35:32.005 -0400 ERROR HttpInputDataHandler - Parsing error : While expecting event's raw text: Unexpected character while looking for value: '}', totalRequestSize=40

05-29-2020 12:33:03.569 -0400 ERROR HttpInputDataHandler - Parsing error : While expecting event object key: Unexpected character: 'e', totalRequestSize=66
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should group by the timestamp of the event as there will be 2 events logged (1 logging the parsing error and the other logging the response sent back to the client , which includes the client ip and the reply code).&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;For example:&lt;/STRONG&gt;&lt;BR /&gt;
05-29-2020 12:39:42.473 -0400 ERROR HttpInputDataHandler - Parsing error : No data&lt;BR /&gt;
05-29-2020 12:39:42.473 -0400 ERROR HttpInputDataHandler - Failed processing http input, token name=idx_cluster_token, channel=FE0ECFAD-13D5-401A-847D-77833DD77131, source_IP=10.140.49.235, reply=5, events_processed=0, http_input_body_size=54&lt;/P&gt;

&lt;P&gt;05-29-2020 13:00:10.016 -0400 ERROR HttpInputDataHandler - Parsing error : While expecting event object to start: Unexpected character while looking for value: '\', totalRequestSize=69&lt;BR /&gt;
05-29-2020 13:00:10.016 -0400 ERROR HttpInputDataHandler - Failed processing http input, token name=idx_cluster_token, channel=FE0ECFAD-13D5-401A-847D-77833DD77131, source_IP=10.140.49.235, reply=6, events_processed=1, http_input_body_size=69&lt;/P&gt;

&lt;P&gt;grouping by _time and host will make these parsing errors easier to decipher:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=_internal source=*splunkd.log HttpInputDataHandler ERROR  | stats values(_raw) by _time host&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Based on the reply code and client source_IP, you should examine the syntax of the request sent by that client or check the health of the HEC receiver.&lt;/P&gt;

&lt;P&gt;HEC reply codes:&lt;BR /&gt;
reply   HttpInputReply  status  event_message&lt;BR /&gt;
0   Success OK  Success&lt;BR /&gt;
1   TokenDisabled   FORBIDDEN   Token disabled&lt;BR /&gt;
2   NoAuthorization UNAUTHORIZED    Token is required&lt;BR /&gt;
3   InvalidAuthorization    UNAUTHORIZED    Invalid authorization&lt;BR /&gt;
4   TokenNotFound   FORBIDDEN   Invalid token&lt;BR /&gt;
5   NoData  BAD_REQUEST No data&lt;BR /&gt;
6   InvalidData BAD_REQUEST Invalid data format&lt;BR /&gt;
7   IncorrectIndex  BAD_REQUEST Incorrect index&lt;BR /&gt;
8   ServerError has been removed as it is not used anywhere&lt;BR /&gt;
9   ServerBusy  SERVICE_UNAVAILABLE Server is busy&lt;BR /&gt;
10  NoChannel   BAD_REQUEST Data channel is missing&lt;BR /&gt;
11  InvalidChannel  BAD_REQUEST Invalid data channel&lt;BR /&gt;
12  NoEvent BAD_REQUEST Event field is required&lt;BR /&gt;
13  BlankEvent  BAD_REQUEST Event field cannot be blank&lt;BR /&gt;
14  AckDisabled BAD_REQUEST ACK is disabled&lt;BR /&gt;
15  UnsupportedType BAD_REQUEST Error in handling indexed fields&lt;BR /&gt;
16  QueryStringAuthNotEnabled   BAD_REQUEST Query string authorization is not enabled&lt;BR /&gt;
17  HECHealthy  OK  HEC is healthy&lt;BR /&gt;
18  QueuesFull  SERVICE_UNAVAILABLE HEC is unhealthy, queues are full&lt;BR /&gt;
19  AckUnavailable  SERVICE_UNAVAILABLE HEC is unhealthy, ack service unavailable&lt;BR /&gt;
20  QueuesFullAckUnavailable    SERVICE_UNAVAILABLE Hec is unhealthy, queues are full, ack service unavailable&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; My test was on Splunk 8.0.4 where the "response" event which includes the source_IP and reply fields are logged as log_level=ERROR&lt;/P&gt;

&lt;P&gt;earlier versions of Splunk require setting the HttpInputDataHandler component into DEBUG to see these events:&lt;/P&gt;

&lt;P&gt;ie: set on the HEC receiver Splunk instance:&lt;BR /&gt;
&lt;CODE&gt;./splunk set log-level HttpInputDataHandler -level DEBUG&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;then back to normal:&lt;BR /&gt;
&lt;CODE&gt;./splunk set log-level HttpInputDataHandler -level WARN&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463906#M80000</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2020-09-30T05:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event Collector: Getting error "HttpInputDataHandler - Parsing error".</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463907#M80001</link>
      <description>&lt;P&gt;or you could also run a search that is easier to digest:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*splunkd.log* log_level=ERROR OR log_level=DEBUG component=HttpInputDataHandler reply=* | eval response_to_client=case(reply=="0","success",reply=="1","Token disabled",reply=="2","Token is required",reply=="3","Invalid authorization",reply=="4","Invalid token",reply=="5","No data",reply=="6","Invalid data format",reply=="7","Incorrect index",reply=="9","Server is busy",reply=="10","Data channel is missing",reply=="11","Invalid data channel",reply=="12","Event field is required",reply=="13","Event field cannot be blank",reply=="14","ACK is disabled",reply=="15","Error in handling indexed fields",reply=="16","Query string authorization is not enabled",reply=="17","HEC is healthy",reply=="18","HEC is unhealthy, queues are full",reply=="19","HEC is unhealthy, ack service unavailable",reply=="20","Hec is unhealthy, queues are full, ack service unavailable") | stats count by host name channel source_IP response_to_client reply | rename host as "HEC Receiver" source_IP as "HEC client"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2020 22:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-Collector-Getting-error-quot-HttpInputDataHandler/m-p/463907#M80001</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2020-05-29T22:57:26Z</dc:date>
    </item>
  </channel>
</rss>

