<?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: first Splunk install - cannot get HEC working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/566999#M100748</link>
    <description>&lt;P&gt;The HEC port is 8088 by default so stick with that one unless you've explicitly changed it.&lt;/P&gt;&lt;P&gt;Check your firewalls to make sure port 8088 is reachable on that server.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 16:57:32 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-09-14T16:57:32Z</dc:date>
    <item>
      <title>first Splunk install - cannot get HEC working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/566987#M100747</link>
      <description>&lt;P&gt;I set up a sample VM for myself to test out Splunk configuration. I wanted a stand-alone service just to make sure I can get my basic configuration running and forward logs from a Kubernetes instance. However, I am stuck in verification of the event receive resource.&lt;/P&gt;&lt;P&gt;Here's the steps I followed:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Setup a Linux VM&lt;/LI&gt;&lt;LI&gt;Get Splunk installed&lt;/LI&gt;&lt;LI&gt;Confirm web is working as expected&lt;/LI&gt;&lt;LI&gt;Create an index called &lt;STRONG&gt;splunk_test_events&lt;/STRONG&gt; that is of (Type: events, App: search)&lt;/LI&gt;&lt;LI&gt;Go to &lt;STRONG&gt;Settings &amp;gt; Forwarding&lt;/STRONG&gt; and Receiving and set up a port for 9997&lt;/LI&gt;&lt;LI&gt;In&amp;nbsp;&lt;STRONG&gt;Settings &amp;gt; Data Inputs&lt;/STRONG&gt; set up an HTTP Event Collector (details below)&lt;/LI&gt;&lt;LI&gt;Ensure tokens are enabled (I forget where this was)&lt;/LI&gt;&lt;LI&gt;Restart Splunk&lt;/LI&gt;&lt;LI&gt;SSH into the machine and check the running ports (see below)&lt;/LI&gt;&lt;LI&gt;Attempt to curl and event&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So the HTTP Event Collector I set up as:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;splunk_testing_events&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;&lt;STRONG&gt;Source Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;Entered Source Type&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;&lt;STRONG&gt;Selected Allowed Indexes&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;splunk_test_events&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;&lt;STRONG&gt;Default Index&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;splunk_test_events&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;&lt;STRONG&gt;Output Group&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;None&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;&lt;STRONG&gt;Enable Indexer Acknowledgement&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD height="25px"&gt;On&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I verified that the HTTP Event Collector is&amp;nbsp;&lt;EM&gt;enabled&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;I log into the machine and check the ports that are active:&lt;/P&gt;&lt;PRE&gt;$ sudo lsof -i -P -n | grep LISTEN
systemd-r   649 systemd-resolve   13u  IPv4  23727      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd        751            root    3u  IPv4  26648      0t0  TCP *:22 (LISTEN)
sshd        751            root    4u  IPv6  26650      0t0  TCP *:22 (LISTEN)
splunkd    6405            root    4u  IPv4  63003      0t0  TCP *:8089 (LISTEN)
splunkd    6405            root   60u  IPv4  63818      0t0  TCP *:9997 (LISTEN)
splunkd    6405            root  128u  IPv4 123397      0t0  TCP *:8088 (LISTEN)
splunkd    6405            root  156u  IPv4  64895      0t0  TCP *:8000 (LISTEN)
mongod     6482            root   10u  IPv4  61364      0t0  TCP *:8191 (LISTEN)
python3.7  6623            root    7u  IPv4  63884      0t0  TCP 127.0.0.1:8065 (LISTEN)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I try and send a curl event over:&lt;/P&gt;&lt;PRE&gt;curl -v -k -H "Authorization: Splunk GENERATED_HEC_TOKEN" http://VM_PUBLIC_IP:9997/services/collector/event -d '{ "event": "testing manually" }'&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get back an error:&lt;/P&gt;&lt;PRE&gt;*   Trying VM_PUBLIC_IP:9997...
* Connected to VM_PUBLIC_IP (VM_PUBLIC_IP) port 9997 (#0)
&amp;gt; POST /services/collector/event HTTP/1.1
&amp;gt; Host: VM_PUBLIC_IP:9997
&amp;gt; User-Agent: curl/7.74.0
&amp;gt; Accept: */*
&amp;gt; Authorization: Splunk GENERATED_HEC_TOKEN
&amp;gt; Content-Length: 31
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 31 out of 31 bytes
* Empty reply from server
* Connection #0 to host VM_PUBLIC_IP left intact
curl: (52) Empty reply from server&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried some of the other ports:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;8088:&lt;/STRONG&gt; Connection reset by peer&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;8089:&lt;/STRONG&gt; Connection reset by peer&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;8000:&lt;/STRONG&gt; HTTP/1.1 303 (which I expected in this case)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 15:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/566987#M100747</guid>
      <dc:creator>ssdarkside2</dc:creator>
      <dc:date>2021-09-14T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: first Splunk install - cannot get HEC working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/566999#M100748</link>
      <description>&lt;P&gt;The HEC port is 8088 by default so stick with that one unless you've explicitly changed it.&lt;/P&gt;&lt;P&gt;Check your firewalls to make sure port 8088 is reachable on that server.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 16:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/566999#M100748</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-09-14T16:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: first Splunk install - cannot get HEC working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/567000#M100749</link>
      <description>&lt;P&gt;I did try that, and I tried to post from localhost and got the same response.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 16:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/567000#M100749</guid>
      <dc:creator>ssdarkside2</dc:creator>
      <dc:date>2021-09-14T16:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: first Splunk install - cannot get HEC working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/567003#M100751</link>
      <description>&lt;P&gt;Confirmed this again just to be sure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ curl -v -k -H "Authorization: Splunk GENERATED_TOKEN" http://localhost:8088/services/collector/event -d '{ "event": "testing manual upload" }'

*   Trying 127.0.0.1:8088...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8088 (#0)
&amp;gt; POST /services/collector/event HTTP/1.1
&amp;gt; Host: localhost:8088
&amp;gt; User-Agent: curl/7.68.0
&amp;gt; Accept: */*
&amp;gt; Authorization: Splunk GENERATED_TOKEN
&amp;gt; Content-Length: 36
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 36 out of 36 bytes
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Sep 2021 17:17:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/567003#M100751</guid>
      <dc:creator>ssdarkside2</dc:creator>
      <dc:date>2021-09-14T17:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: first Splunk install - cannot get HEC working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/658782#M111409</link>
      <description>&lt;P&gt;Got same results as you, try https not http&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 18:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/first-Splunk-install-cannot-get-HEC-working/m-p/658782#M111409</guid>
      <dc:creator>terry_berryhill</dc:creator>
      <dc:date>2023-09-26T18:19:35Z</dc:date>
    </item>
  </channel>
</rss>

