<?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: HTTP Event collector - call not properly authenticated in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489894#M83753</link>
    <description>&lt;P&gt;Here is my take:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;It might be a red herring, but are you sure the credentials are accepted at CLI? In Splunk 8.0.x, if you use the default &lt;CODE&gt;admin&lt;/CODE&gt; credentials, it would ask the user to change the password from &lt;CODE&gt;changeme&lt;/CODE&gt; to something else before it allows the user to do anything else. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ ./splunk http-event-collector create sdapp01 -uri &lt;A href="https://localhost:8089" target="test_blank"&gt;https://localhost:8089&lt;/A&gt; -description "this is a new token" -disabled 1
Splunk username: admin
Password: 
The administrator requires you to change your password.
Please enter a new password: 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Also, can you go to Splunk web and make sure that this HEC token is indeed shown as&lt;CODE&gt;enabled&lt;/CODE&gt; there?  If not, click on &lt;CODE&gt;Global Settings&lt;/CODE&gt; and make sure that &lt;CODE&gt;Enabled&lt;/CODE&gt; is set there. &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;CODE&gt;IF STILL TO NO VAIL, TRY THIS&lt;/CODE&gt;, this is the nuke of all CLI commands arsenal for HEC,  this is the &lt;STRONG&gt;ULTIMATE ULTIMATE WEAPON&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;curl -k &lt;A href="https://127.0.0.1:8088/services/collector/event"&gt;https://127.0.0.1:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk  [your token]" -d '{"event": "Dodge this!"}'&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;And the end of all these, you should be able to get a response saying&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"text":"Success","code":0}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then go to Splunk Web to do a search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=http:sdapp01
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should be able to see the event there. Good luck!&lt;/P&gt;</description>
    <pubDate>Sun, 03 May 2020 04:06:35 GMT</pubDate>
    <dc:creator>tauliang</dc:creator>
    <dc:date>2020-05-03T04:06:35Z</dc:date>
    <item>
      <title>HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489889#M83748</link>
      <description>&lt;P&gt;Have tried to setup HTTPEventCollector via cli using splunk documentation link: &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.3/Data/UseHECfromtheCLI"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.3/Data/UseHECfromtheCLI&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Commands i have executed are as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/splunk/bin/splunk http-event-collector create sdapp01 -uri &lt;A href="https://localhost:8089" target="test_blank"&gt;https://localhost:8089&lt;/A&gt; -description "this is a new token" -disabled 1

/opt/splunk/bin/splunk http-event-collector enable -name sdapp01 -uri &lt;A href="https://localhost:8089" target="test_blank"&gt;https://localhost:8089&lt;/A&gt; -auth admin:changeme

curl -k -u admin:changeme &lt;A href="https://localhost:8089/servicesNS/admin/splunk_httpinput/data/inputs/http" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/splunk_httpinput/data/inputs/http&lt;/A&gt;

splunk http-event-collector send -uri &lt;A href="https://localhost:8089" target="test_blank"&gt;https://localhost:8089&lt;/A&gt; -token 206f9ca0-24bd-48fd-95e8-dfdcaa17657a {"this is some data"}

curl -k &lt;A href="https://localhost:8089/services/collector" target="test_blank"&gt;https://localhost:8089/services/collector&lt;/A&gt; -H 'Authorization: Splunk 206f9ca0-24bd-48fd-95e8-dfdcaa17657a' -d '{"sourcetype": "demo", "event":"Hello, world!"}'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;while sending data am getting error as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
    &amp;lt;response&amp;gt;
      &amp;lt;messages&amp;gt;
        &amp;lt;msg type="WARN"&amp;gt;call not properly authenticated&amp;lt;/msg&amp;gt;
      &amp;lt;/messages&amp;gt;
    &amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Config details are as mentioned below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;local/inputs.conf
[http://sdapp01]
disabled = 0
token = 206f9ca0-24bd-48fd-95e8-dfdcaa17657a

default/inputs.conf
[http]
disabled=1
port=8088
enableSSL=1
dedicatedIoThreads=2
maxThreads = 0
maxSockets = 0
useDeploymentServer=0
# ssl settings are similar to mgmt server
sslVersions=*,-ssl2
allowSslCompression=true
allowSslRenegotiation=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure what have i missed. Token is enabled, not expired. Have tried creating multiple tokens but stuck with same issue. Can someone please help.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 04:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489889#M83748</guid>
      <dc:creator>sdkp03</dc:creator>
      <dc:date>2020-05-01T04:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489890#M83749</link>
      <description>&lt;P&gt;Did you restart Splunk after enabling HEC?&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 16:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489890#M83749</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-01T16:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489891#M83750</link>
      <description>&lt;P&gt;Change &lt;CODE&gt;disabled=1&lt;/CODE&gt; to  &lt;CODE&gt;disabled=0&lt;/CODE&gt;, restart splunk. Then, change your curl command to port 8088 not 8089 and try again.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 22:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489891#M83750</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2020-05-01T22:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489892#M83751</link>
      <description>&lt;P&gt;Yes i did restart multiple times but with no luck&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 03:12:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489892#M83751</guid>
      <dc:creator>sdkp03</dc:creator>
      <dc:date>2020-05-03T03:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489893#M83752</link>
      <description>&lt;P&gt;in local/inputs.conf, the disabled field is set to 0. I have restarted splunk services multiple times, dont see any change. I have tried accessing port 8088, and the output was - couldn't connect to host!&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 03:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489893#M83752</guid>
      <dc:creator>sdkp03</dc:creator>
      <dc:date>2020-05-03T03:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489894#M83753</link>
      <description>&lt;P&gt;Here is my take:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;It might be a red herring, but are you sure the credentials are accepted at CLI? In Splunk 8.0.x, if you use the default &lt;CODE&gt;admin&lt;/CODE&gt; credentials, it would ask the user to change the password from &lt;CODE&gt;changeme&lt;/CODE&gt; to something else before it allows the user to do anything else. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ ./splunk http-event-collector create sdapp01 -uri &lt;A href="https://localhost:8089" target="test_blank"&gt;https://localhost:8089&lt;/A&gt; -description "this is a new token" -disabled 1
Splunk username: admin
Password: 
The administrator requires you to change your password.
Please enter a new password: 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Also, can you go to Splunk web and make sure that this HEC token is indeed shown as&lt;CODE&gt;enabled&lt;/CODE&gt; there?  If not, click on &lt;CODE&gt;Global Settings&lt;/CODE&gt; and make sure that &lt;CODE&gt;Enabled&lt;/CODE&gt; is set there. &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;CODE&gt;IF STILL TO NO VAIL, TRY THIS&lt;/CODE&gt;, this is the nuke of all CLI commands arsenal for HEC,  this is the &lt;STRONG&gt;ULTIMATE ULTIMATE WEAPON&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;curl -k &lt;A href="https://127.0.0.1:8088/services/collector/event"&gt;https://127.0.0.1:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk  [your token]" -d '{"event": "Dodge this!"}'&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;And the end of all these, you should be able to get a response saying&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"text":"Success","code":0}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then go to Splunk Web to do a search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=http:sdapp01
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should be able to see the event there. Good luck!&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 04:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489894#M83753</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-03T04:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489895#M83754</link>
      <description>&lt;P&gt;Have verified from web console, and can confirm that the token is enabled. I did try executing ULTIMATE WEAPON command. still no luck. have pasted output here for your reference:&lt;BR /&gt;
[splunk@## ~]$  curl -k &lt;A href="https://127.0.0.1:8088/services/collector/event"&gt;https://127.0.0.1:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk 206f9ca0-24bd-48fd-95e8-dfdcaa17657a" -d '{"event": "Dodge this!"}'&lt;BR /&gt;
curl: (7) couldn't connect to host&lt;BR /&gt;
[splunk@## ~]$  curl -k &lt;A href="https://127.0.0.1:8089/services/collector/event"&gt;https://127.0.0.1:8089/services/collector/event&lt;/A&gt; -H "Authorization: Splunk 206f9ca0-24bd-48fd-95e8-dfdcaa17657a" -d '{"event": "Dodge this!"}'&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;msg type="WARN"&amp;gt;call not properly authenticated&amp;lt;/msg&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For some strange reason 8088 doesnt work for me as am always prompted with error "host not found". When i use port 8089, i end up with error - call not authenticated.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 06:02:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489895#M83754</guid>
      <dc:creator>sdkp03</dc:creator>
      <dc:date>2020-05-04T06:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489896#M83755</link>
      <description>&lt;P&gt;This is strange indeed. Did you see any other errors in &lt;CODE&gt;_internal&lt;/CODE&gt; index? &lt;BR /&gt;
Also, if you do a port scan of local ports, what do you see? Is port 8088 open? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Port Scan has started…

Port Scanning host: 127.0.0.1

     Open TCP Port:     8000        irdmi
     Open TCP Port:     8065
     Open TCP Port:     8088        radan-http
     Open TCP Port:     8089
     Open TCP Port:     8191
Port Scan has completed…
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 May 2020 15:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489896#M83755</guid>
      <dc:creator>tauliang</dc:creator>
      <dc:date>2020-05-04T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Event collector - call not properly authenticated</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489897#M83756</link>
      <description>&lt;P&gt;Had to add an extra stanza in local/inputs.conf&lt;BR /&gt;
[http]&lt;BR /&gt;
 disabled=1&lt;/P&gt;

&lt;P&gt;Thats it, and it works like magic.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 01:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/HTTP-Event-collector-call-not-properly-authenticated/m-p/489897#M83756</guid>
      <dc:creator>sdkp03</dc:creator>
      <dc:date>2020-05-13T01:36:53Z</dc:date>
    </item>
  </channel>
</rss>

