<?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 Testing the HTTP Event Collector, why am I getting a &amp;quot;Server is busy&amp;quot; message? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251484#M48414</link>
    <description>&lt;PRE&gt;&lt;CODE&gt; curl -k  &lt;A href="https://localhost:8088/services/collector/event" target="test_blank"&gt;https://localhost:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk 8F6CCFXA-6D7B-48BE-A59F-7361D6003422" -d '{"event": "hello world"}'
{"text":"Server is busy","code":9}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help is much appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2016 20:30:47 GMT</pubDate>
    <dc:creator>brent_weaver</dc:creator>
    <dc:date>2016-10-11T20:30:47Z</dc:date>
    <item>
      <title>Testing the HTTP Event Collector, why am I getting a "Server is busy" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251484#M48414</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; curl -k  &lt;A href="https://localhost:8088/services/collector/event" target="test_blank"&gt;https://localhost:8088/services/collector/event&lt;/A&gt; -H "Authorization: Splunk 8F6CCFXA-6D7B-48BE-A59F-7361D6003422" -d '{"event": "hello world"}'
{"text":"Server is busy","code":9}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help is much appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 20:30:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251484#M48414</guid>
      <dc:creator>brent_weaver</dc:creator>
      <dc:date>2016-10-11T20:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Testing the HTTP Event Collector, why am I getting a "Server is busy" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251485#M48415</link>
      <description>&lt;P&gt;Hi Brent, &lt;/P&gt;

&lt;P&gt;Maybe you can try this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k  "https://localhost:8088/services/collector"
 -H "Authorization: Splunk 8F6CCFXA-6D7B-48BE-A59F-7361D6003422" 
 -d '{"event": "hello world"}'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 06:28:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251485#M48415</guid>
      <dc:creator>hunters_splunk</dc:creator>
      <dc:date>2016-10-12T06:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Testing the HTTP Event Collector, why am I getting a "Server is busy" message?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251486#M48416</link>
      <description>&lt;P&gt;BLUF:  Clearing my indexer acknowledgement cache fixed this problem for me.&lt;/P&gt;

&lt;P&gt;I ran into this problem while running a Python script I wrote that extracted log data from a PostgreSQL AWS RDS and forwarded it into a Managed Splunk Cloud instance.    The script ran fine for a while, then out of the blue new events no longer showed up in Splunk.  The Splunk index my events were being sent to was not full, and events from other sources in our architecture continued to index as they always had.  &lt;/P&gt;

&lt;P&gt;I ended up writing a python script that cleared out the "acks" for the  channel UUID I was using, and then my RDS-to-HEC forwarder ran fine after that.  &lt;/P&gt;

&lt;P&gt;I don't have permissions to access the other HEC input tokens and the indexes the indexes they're used to send data to, so I don't know if this was an issue of too many acks still pending query across the entire system, or if my HEC token/Channel combo specifically had too many.  Regardless, I'm fairly certain that the buildup of un-queried indexer acknowledgements had something to do with my forwarder failing because of {"text":"Server is busy","code":9} errors.  &lt;/P&gt;

&lt;P&gt;See docs about Indexer Acknowledgement: &lt;BR /&gt;
 &lt;A href="http://dev.splunk.com/view/event-collector/SP-CAAAE8X" target="_blank"&gt;http://dev.splunk.com/view/event-collector/SP-CAAAE8X&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My python script: &lt;/P&gt;

&lt;P&gt;import requests&lt;BR /&gt;
from requests.packages.urllib3.exceptions import InsecureRequestWarning&lt;BR /&gt;
import json&lt;BR /&gt;
import sys&lt;BR /&gt;
from ast import literal_eval&lt;/P&gt;

&lt;P&gt;requests.packages.urllib3.disable_warnings(InsecureRequestWarning)&lt;BR /&gt;
h = {}&lt;BR /&gt;
h['X-Splunk-Request-Channel'] = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'&lt;BR /&gt;
h['Authorization'] = 'Splunk xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'&lt;BR /&gt;
u = '&lt;A href="https://input-prd-p-xxxxxxxxxx.cloud.splunk.com:8088/services/collector/ack" target="_blank"&gt;https://input-prd-p-xxxxxxxxxx.cloud.splunk.com:8088/services/collector/ack&lt;/A&gt;'&lt;BR /&gt;
r = {}&lt;BR /&gt;
r['acks'] = {'0':'false'}&lt;BR /&gt;
i = 0&lt;BR /&gt;
n_trues = 0&lt;BR /&gt;
while i &amp;lt; 1000000000:&lt;BR /&gt;
    p = {"acks":[i,i+1,i+2,i+3,i+4,i+5,i+6,i+7,i+8,i+9]}&lt;BR /&gt;
    r = requests.post(u, json=p, headers=h, verify=False).json()&lt;BR /&gt;
    i += 10&lt;BR /&gt;
    l = [k for k in r['acks'].keys() if r['acks'][k] == True]&lt;BR /&gt;
    n_trues += len(l)&lt;BR /&gt;
    if os.path.isfile("stop.txt"):&lt;BR /&gt;
        print "quitting."&lt;BR /&gt;
        exit()&lt;BR /&gt;
    with open("progress.txt",'w') as f:&lt;BR /&gt;
        s = str(i) + " , " + str(n_trues)&lt;BR /&gt;
        f.write(s)&lt;BR /&gt;
        f.close()&lt;BR /&gt;
    sys.stdout.write('.')&lt;BR /&gt;
    sys.stdout.flush()&lt;BR /&gt;
with open("progress.txt",'a') as f:&lt;BR /&gt;
    f.write("\n")&lt;BR /&gt;
    json.dump(r,f)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:41:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Testing-the-HTTP-Event-Collector-why-am-I-getting-a-quot-Server/m-p/251486#M48416</guid>
      <dc:creator>stevenchamales</dc:creator>
      <dc:date>2020-09-29T17:41:46Z</dc:date>
    </item>
  </channel>
</rss>

