Getting "Error doing job: SSL handshake failed" spam in log, any ideas?

Hey guys,
I am getting a spam of similar messages in the log.

2018-08-10 10:35:41 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()

Any ideas where i should look? im clueless :S
Thanks in advance!

Are your ssl certificates still valid?

how do i check?
I mean, i can still access hassio remotely (from outside my lan using the duckdns address) is that enough?

You can add this sensor:

- platform: cert_expiry
  host: [yourdomain].duckdns.org

Added

cors_allowed_origins:
- http://hassio.xxxxx.tld:port
- http://hassio.local:port

Under http: inside configuration.yaml as per this guy’s instructions on github and it seems to fix it.

Nope, still happening (after some hours of restart)
Will have to wait for the github issue to be resolved i guess?

Just to add - I’m having the same issue:

2018-09-06 08:51:34 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:841)
2018-09-06 08:51:34 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: NO_SHARED_CIPHER
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:841)

me too

2018-09-15 17:38:19 ERROR (MainThread) [homeassistant.core] Error doing job: SSL     handshake failed
    Traceback (most recent call last):
      File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:841)
    2018-09-15 17:38:19 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: WRONG_VERSION_NUMBER
    Traceback (most recent call last):
      File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
      File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:841)
    2018-09-15 17:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
    Traceback (most recent call last):
      File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:841)
    2018-09-15 17:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: NO_SHARED_CIPHER
    Traceback (most recent call last):
      File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
      File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:841)
1 Like

Me too. Removed the files in /ssl so Duckdns generated new ones, but still getting those errors in my log file.

HI to all i think i found the responsible. I was having the same error message like the posts here mention.
After many testing i think i found the responsible. Removing Yahoo Weather from my configuration file completely fixed it no more message since the last 3 days.

What was the resolution ? Did this resolved the erreor for everybody ?

Log Details (ERROR)
Tue Oct 16 2018 08:08:30 GMT+0200 (Central European Summer Time)

Error doing job: SSL handshake failed
Traceback (most recent call last):
File “uvloop/handles/stream.pyx”, line 609, in uvloop.loop.UVStream._on_eof
File “uvloop/sslproto.pyx”, line 171, in uvloop.loop._SSLPipe.feed_ssldata
File “/usr/local/lib/python3.6/ssl.py”, line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:841)

Running 80.3 on HassOS, every 1 sec there is this entry


    2018-10-20 10:35:34 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
    Traceback (most recent call last):
      File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)
    2018-10-20 10:35:34 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: HTTP_REQUEST
    Traceback (most recent call last):
      File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
      File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
      File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
      File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)

Funny thing is SSL connection shows a valid certiicate, but the SSL sensor shows ‘unknown’ days left ???

Same issue here, but I think that can be related with local HA access.
I post other reply here: Connectivity Issues - duckdns

I have the same issue but I don’t use duckdns. I’m on docker if that makes any difference.
Everything else works

I get slight variations though.
Here is one:

2018-10-26 08:54:06 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: UNSUPPORTED_PROTOCOL
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:841)

and a different one:

2018-10-26 01:30:25 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: HTTP_REQUEST
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)

and a third one:

2018-10-26 01:29:38 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: WRONG_VERSION_NUMBER
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:841)

and

2018-10-25 22:04:09 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: NO_SHARED_CIPHER
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:841)

last one:

2018-10-25 09:36:18 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: DECRYPTION_FAILED_OR_BAD_RECORD_MAC
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:841)

The key difference is the first and last line


Add the following in the http: section in configuration.yaml:

ssl_profile: intermediate

Thanks, for now it looks like it’s solving my issue.
And I don’t know if this is related (seems an awful lot of coincidence) or upgrade to 0.81 but I also no longer have issues on my scrape sensors (this post)

sorry, SSL issues are still here even witht the ssl_profile: intermediate entry:

2018-10-29 17:23:54 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:847)
2018-10-29 17:23:54 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: WRONG_VERSION_NUMBER
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:847)
2018-10-29 17:23:54 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:847)
2018-10-29 17:23:54 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: WRONG_VERSION_NUMBER
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:847)

Hi,

Since I also see these ssl mentions in the logs, I’d love to solve that. Before I dare to though, may I ask where this option is documented, and why this could solve the issue at hand?

There’s an open issue on github. It was mentioned there. Can’t find it at the moment.

ssl_profile: intermediate did not work for me either.

1 Like

Can’t find the issue on GitHub either ATM. And I’ve seen the SSL errors back too
 Oh well