Hi, Im an end user so apologies if this is only meant for contributors, but I saw there was a previous issue #45 that was addressed, but I am still seeing this issue on Ubuntu 20.04 LTS connecting to ESXi 5.1. I've installed pyhton3 via apt and pywbem via pip. I'm running:
check_esxi_hardware.py" --host=192.168.1.17 --user=root --pass=1234566 --sslproto=TLSv1.0 --vendor=ibm
And getting the same error as previously reported
`Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
_raise_current_error()
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 383, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 747, in urlopen
return self.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.17', port=5989): Max retries exceeded with url: /cimom (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_http.py", line 315, in wbem_request
resp = conn.session.post(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.17', port=5989): Max retries exceeded with url: /cimom (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/nagios/plugins//check_esxi_hardware.py", line 775, in
instance_list = wbemclient.EnumerateInstances(classe)
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 2628, in EnumerateInstances
result = self._imethodcall(
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_operations.py", line 1746, in _imethodcall
reply_data, self._last_server_response_time = wbem_request(
File "/usr/local/lib/python3.8/dist-packages/pywbem/_cim_http.py", line 320, in wbem_request
raise ConnectionError(msg, conn_id=conn.conn_id)
pywbem._exceptions.ConnectionError: ("bad handshake: Error([('SSL routines', 'ssl_choose_client_version', 'unsupported protocol')])",); OpenSSL version used: OpenSSL 1.1.1f 31 Mar 2020
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/nagios/plugins//check_esxi_hardware.py", line 776, in
except pywbem.cim_operations.CIMError as args:
AttributeError: module 'pywbem' has no attribute 'cim_operations'`
Possibly I'm doing something wrong? Or is this issue not fixed given my configuration?
TIA, Andy.