I am not able to connect to splunk web console using python sdk getting timedout error , I am suspecting port is not allowing, Could you please help my code -------------------------- import sys import getpass sys.path.append('splunk-sdk-python-1.6.16') import splunklib.client as client def setServer(hostname, splunkuser, splunkpassword): HOST = hostname PORT = 8089 USERNAME = splunkuser PASSWORD = splunkpassword service = client.connect(host=HOST,port=PORT,username=USERNAME,password=PASSWORD) #for app in service.apps: # print (app.name) # Get the collection of users #users = service.users # print(users) if __name__ == "__main__": hostname = input("Enter Splunk Hostname/IP: ") splunkUser = input("Enter Splunk Admin Username: ") splunkPassword = getpass.getpass("Enter Splunk Admin Password: ") setServer(hostname, splunkUser, splunkPassword) ----------------------------------------------------------------- output ----------------------- #python3 test66.py Enter Splunk Hostname/IP: prd-p-pivip.splunkcloud.com Enter Splunk Admin Username: sc_admin Enter Splunk Admin Password: Traceback (most recent call last): File "/Users/sasikanth.bontha/test66.py", line 23, in <module> setServer(hostname, splunkUser, splunkPassword) File "/Users/sasikanth.bontha/test66.py", line 11, in setServer service = client.connect(host=HOST,port=PORT,username=USERNAME,password=PASSWORD) File "/usr/local/lib/python3.9/site-packages/splunklib/client.py", line 331, in connect s.login() File "/usr/local/lib/python3.9/site-packages/splunklib/binding.py", line 883, in login response = self.http.post( File "/usr/local/lib/python3.9/site-packages/splunklib/binding.py", line 1242, in post return self.request(url, message) File "/usr/local/lib/python3.9/site-packages/splunklib/binding.py", line 1259, in request response = self.handler(url, message, **kwargs) File "/usr/local/lib/python3.9/site-packages/splunklib/binding.py", line 1399, in request connection.request(method, path, body, head) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1257, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1303, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1252, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1012, in _send_output self.send(msg) File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 952, in send self.connect() File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1419, in connect super().connect() File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 923, in connect self.sock = self._create_connection( File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 843, in create_connection raise err File "/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 831, in create_connection sock.connect(sa) TimeoutError: [Errno 60] Operation timed out
... View more