I'm trying to make a basic connection with my local instance of splunk, but it's giving me a SSLError. Have setup splunk for the first time on my local system. Did try disabling ssl from a few config files but to no use. Missing something extremely basic here
Splunk Version: 6.4.0
Python Version(which came with Splunk): 2.7.11
Python Version(SDK is using): 2.7.10 [Will it affect it?]
import splunklib.client as client
HOST = "localhost"
PORT = 8000
USERNAME = "admin"
PASSWORD = "changeme"
service = client.connect(host=HOST, port=PORT, username=USERNAME, password=PASSWORD)
print service.apps.list()
Stacktrace:
Traceback (most recent call last):
File "C:/Users/alnu/PycharmProjects/Splunk_Automate/test1.py", line 9, in <module>
service = client.connect(host=HOST, port=PORT, username=USERNAME, password=PASSWORD)
File "C:\Users\alnu\IdeaProjects\virtualenvs\splunk_venv\lib\site-packages\splunklib\client.py", line 321, in connect
s.login()
File "C:\Users\alnu\IdeaProjects\virtualenvs\splunk_venv\lib\site-packages\splunklib\binding.py", line 857, in login
cookie="1") # In Splunk 6.2+, passing "cookie=1" will return the "set-cookie" header
File "C:\Users\alnu\IdeaProjects\virtualenvs\splunk_venv\lib\site-packages\splunklib\binding.py", line 1201, in post
return self.request(url, message)
File "C:\Users\alnu\IdeaProjects\virtualenvs\splunk_venv\lib\site-packages\splunklib\binding.py", line 1218, in request
response = self.handler(url, message, **kwargs)
File "C:\Users\alnu\IdeaProjects\virtualenvs\splunk_venv\lib\site-packages\splunklib\binding.py", line 1357, in request
connection.request(method, path, body, head)
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 1274, in connect
server_hostname=server_hostname)
File "C:\Python27\Lib\ssl.py", line 352, in wrap_socket
_context=self)
File "C:\Python27\Lib\ssl.py", line 579, in __init__
self.do_handshake()
File "C:\Python27\Lib\ssl.py", line 808, in do_handshake
self._sslobj.do_handshake()
... View more