Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Python SDK connection error: socket.gaierror: [Errno 11004] getaddrinfo failed

$
0
0
I am trying to connect using the example: import splunklib.client as client # Create a Service instance and log in with client.connect( host="http://myhost", port=0000, username="me", password="my password") as conn: # Print installed apps to the console to verify login for app in conn.apps: print app.name But I am getting the following error: Traceback (most recent call last): File "C:/Users/anshanno/PycharmProjects/splunkTest/splunkSDKtest.py", line 8, in password="my password") as conn: File "C:\Python27\lib\site-packages\splunk_sdk-1.6.0-py2.7.egg\splunklib\client.py", line 321, in connect s.login() File "C:\Python27\lib\site-packages\splunk_sdk-1.6.0-py2.7.egg\splunklib\binding.py", line 857, in login cookie="1") # In Splunk 6.2+, passing "cookie=1" will return the "set-cookie" header File "C:\Python27\lib\site-packages\splunk_sdk-1.6.0-py2.7.egg\splunklib\binding.py", line 1201, in post return self.request(url, message) File "C:\Python27\lib\site-packages\splunk_sdk-1.6.0-py2.7.egg\splunklib\binding.py", line 1218, in request response = self.handler(url, message, **kwargs) File "C:\Python27\lib\site-packages\splunk_sdk-1.6.0-py2.7.egg\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 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 557, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 11004] getaddrinfo failed Has anyone else experienced this or know what is causing the issue? I have replaced my connection info for obvious reasons :) Any help is appreciated.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>