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
In Splunk Cloud, that port is blocked by default. Contact customer support to request that they unblock the port for you.
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.
In Splunk Cloud, that port is blocked by default. Contact customer support to request that they unblock the port for you.
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
Thanks. It turns out that opening the port has fixed my problem. I appreciate the speedy response.
contact devinfo@splunk.com they normally get back to you in 24hrs.
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