<?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 How to resolve error when trying to run a query on localhost using Splunk SDKs: &amp;quot;ConnectionRefusedError&amp;quot;? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-resolve-error-when-trying-to-run-a-query-on-localhost/m-p/425423#M7569</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am getting below error when trying to run query using splunk SDKs,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;python "C:\......\splunk-sdk-python-1.6.6\splunk-sdk-python-1.6.6\examples\search.py" "search index=_internal | stats count by node_type"

  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1016, in _send_output
    self.send(msg)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 956, in send
    self.connect()
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1384, in connect
    super().connect()
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 928, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "C:\Program Files (x86)\Python\lib\socket.py", line 727, in create_connection
    raise err
  File "C:\Program Files (x86)\Python\lib\socket.py", line 716, in create_connection
    sock.connect(sa)

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any idea what is going wrong here?&lt;BR /&gt;Are there any prerequisites to use SDKs?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 18:05:58 GMT</pubDate>
    <dc:creator>Arpit_S</dc:creator>
    <dc:date>2020-06-07T18:05:58Z</dc:date>
    <item>
      <title>How to resolve error when trying to run a query on localhost using Splunk SDKs: "ConnectionRefusedError"?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-resolve-error-when-trying-to-run-a-query-on-localhost/m-p/425423#M7569</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am getting below error when trying to run query using splunk SDKs,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;python "C:\......\splunk-sdk-python-1.6.6\splunk-sdk-python-1.6.6\examples\search.py" "search index=_internal | stats count by node_type"

  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1016, in _send_output
    self.send(msg)
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 956, in send
    self.connect()
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 1384, in connect
    super().connect()
  File "C:\Program Files (x86)\Python\lib\http\client.py", line 928, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "C:\Program Files (x86)\Python\lib\socket.py", line 727, in create_connection
    raise err
  File "C:\Program Files (x86)\Python\lib\socket.py", line 716, in create_connection
    sock.connect(sa)

ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any idea what is going wrong here?&lt;BR /&gt;Are there any prerequisites to use SDKs?&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 18:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-resolve-error-when-trying-to-run-a-query-on-localhost/m-p/425423#M7569</guid>
      <dc:creator>Arpit_S</dc:creator>
      <dc:date>2020-06-07T18:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve error when trying to run a query on localhost using Splunk SDKs: "ConnectionRefusedError"?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-resolve-error-when-trying-to-run-a-query-on-localhost/m-p/425424#M7570</link>
      <description>&lt;P&gt;Did anyone fixed this error?&lt;BR /&gt;
I am facing same issue...&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 12:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-resolve-error-when-trying-to-run-a-query-on-localhost/m-p/425424#M7570</guid>
      <dc:creator>ganapathymanian</dc:creator>
      <dc:date>2020-06-04T12:49:33Z</dc:date>
    </item>
  </channel>
</rss>

