K8ssandra medusa containers fails to start cause it can't connect to s3 compatib…le storage with self-signed certificate.
The medusa container log the following errors (I got the same whether secure = false or secure = true in medusa.ini)
`[2022-12-21 06:55:58,111] DEBUG: Starting new HTTPS connection (1): XXXXXX.com:443
Traceback (most recent call last):
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/connection.py", line 426, in connect
tls_in_tls=tls_in_tls,
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 450, in ssl_wrap_socket
sock, context, tls_in_tls, server_hostname=server_hostname
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cassandra/.local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/cassandra/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='XXXXXX.com', port=443): Max retries exceeded with url: /backup-medusa (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/cassandra/medusa/service/grpc/server.py", line 158, in <module>
medusa_pb2_grpc.add_MedusaServicer_to_server(MedusaService(config), server)
File "/home/cassandra/medusa/service/grpc/server.py", line 44, in __init__
self.storage = Storage(config=self.config.storage)
File "/home/cassandra/medusa/storage/__init__.py", line 72, in __init__
self.storage_driver = self._connect_storage()
File "/home/cassandra/medusa/storage/__init__.py", line 88, in _connect_storage
s3_storage = S3BaseStorage(self._config)
File "/home/cassandra/medusa/storage/abstract_storage.py", line 40, in __init__
self.bucket = self.driver.get_container(container_name=config.bucket_name)
File "/home/cassandra/.local/lib/python3.6/site-packages/libcloud/storage/drivers/s3.py", line 357, in get_container
method='HEAD')
File "/home/cassandra/.local/lib/python3.6/site-packages/libcloud/common/base.py", line 623, in request
headers=headers, stream=stream)
File "/home/cassandra/.local/lib/python3.6/site-packages/libcloud/http.py", line 232, in request
verify=self.verification
File "/home/cassandra/.local/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/cassandra/.local/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/cassandra/.local/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='XXXXX.com', port=443): Max retries exceeded with url: /backup-medusa (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))`