Splunk Dev

Does the Python SDK work with Splunk Cloud?

fdarrigo
Path Finder

I am trying to run the SDK examples in Python, but I cannot connect to SplunkCloud instance.
Specifically, I am running splunk-sdk-python\examples\abc\a.py with the following changes:

HOST="<myinstance>.splunkcloud.com"
PORT = 8089
USERNAME = "myusername"
PASSWORD = "mypassword"

I am receiving the following errors:

Traceback (most recent call last):
  File "C:\Python27\Lib\splunk-sdk-python-master\examples\abc\a.py", line 38, in <module>
    connection.request("POST", "/services/auth/login", body, headers)
  File "C:\Python27\lib\httplib.py", line 1053, in request
    self._send_request(method, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 1093, in _send_request
    self.endheaders(body)
  File "C:\Python27\lib\httplib.py", line 1049, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 893, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 855, in send
    self.connect()
  File "C:\Python27\lib\httplib.py", line 1266, in connect
    HTTPConnection.connect(self)
  File "C:\Python27\lib\httplib.py", line 832, in connect
    self.timeout, self.source_address)
  File "C:\Python27\lib\socket.py", line 575, in create_connection
    raise err
****error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond****

I confirmed the management port is 8089 and I know the credentials are correct.

Any help would be greatly appreciated.
Frank

0 Karma
1 Solution

andrewb_splunk
Splunk Employee
Splunk Employee

In Splunk Cloud, that port is blocked by default. Contact customer support to request that they unblock the port for you.

View solution in original post

tpavlik_splunk
Splunk Employee
Splunk Employee

You can have the port opened and have a dedicated user with credentials created by requesting through the Splunk Support Portal, here is more information: https://docs.splunk.com/Documentation/Splunk/8.0.5/RESTTUT/RESTandCloud. The devinfo@splunk.com mailing list is unable to assist with those requests, unfortunately.

0 Karma

andrewb_splunk
Splunk Employee
Splunk Employee

In Splunk Cloud, that port is blocked by default. Contact customer support to request that they unblock the port for you.

thellmann
Splunk Employee
Splunk Employee

Documentation on these limitations can be found here: https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTandCloud

And in case you haven't done this before, the link to file a case with Splunk Support can be found here: https://splunkcommunities.force.com/customers/home/home.jsp

0 Karma

fdarrigo
Path Finder

Thanks. It turns out that opening the port has fixed my problem. I appreciate the speedy response.

0 Karma

bmacias84
Champion

contact devinfo@splunk.com they normally get back to you in 24hrs.

0 Karma

thellmann
Splunk Employee
Splunk Employee

Actually, you'll need to file a case with Splunk Support using the Support portal. You can learn more on this page: https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTandCloud

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...