Hello
Today I ran into a lot of ssl issues with my html5 notify platform and the coinmarketcap sensors, which are both throwing the same SSL band handshake error:
2018-05-08 09:20:29 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform coinmarketcap
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 441, in wrap_socket
cnx.do_handshake()
File "/srv/homeassistant/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1806, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/srv/homeassistant/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1546, in _raise_ssl_error
_raise_current_error()
File "/srv/homeassistant/lib/python3.5/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 448, in wrap_socket
raise ssl.SSLError('bad handshake: %r' % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/srv/homeassistant/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.coinmarketcap.com', port=443): Max retries exceeded with url: /v1/ticker/iota/?convert=usd&limit=1 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/coinmarketcap.py", line 56, in setup_platform
CoinMarketCapData(currency, display_currency).update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/coinmarketcap.py", line 135, in update
convert=self.display_currency)
File "/srv/homeassistant/lib/python3.5/site-packages/coinmarketcap/core.py", line 82, in ticker
response = self.__request('ticker/' + currency, params)
File "/srv/homeassistant/lib/python3.5/site-packages/coinmarketcap/core.py", line 33, in __request
response_object = self.session.get(self.base_url + endpoint, params = params, timeout = self.request_timeout)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests_cache/core.py", line 126, in request
**kwargs
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests_cache/core.py", line 99, in send
return send_request_and_cache_response()
File "/srv/homeassistant/lib/python3.5/site-packages/requests_cache/core.py", line 91, in send_request_and_cache_response
response = super(CachedSession, self).send(request, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.coinmarketcap.com', port=443): Max retries exceeded with url: /v1/ticker/iota/?convert=usd&limit=1 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
What could be the cause of this problem?ยจ
thank you in advance