fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 101 forks source link

Log getting spammed Task exception was never retrieved #483

Closed enkama closed 2 years ago

enkama commented 2 years ago

Environment: Please provide useful information about your environment, like:

Additional context Getting looked spammed with this message. What is going wrong? I have two E1 Zoom's just one is throwing this error.

2022-04-08 19:09:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport
    await waiter
ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/reolink_dev/sensor.py", line 163, in handle_event
    await self._hass.async_add_job(self._update_event_range)
  File "/config/custom_components/reolink_dev/sensor.py", line 98, in _update_event_range
    search, _ = await self._base.send_search(start, end, True)
  File "/config/custom_components/reolink_dev/base.py", line 277, in send_search
    return await self._api.send_search(start, end, only_status)
  File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1576, in send_search
    response = await self.send(body, {"cmd": command})
  File "/usr/local/lib/python3.9/site-packages/reolink/camera_api.py", line 1696, in send
    async with session.post(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.178.***:443 ssl:default [None]
enkama commented 2 years ago

Nevermind. Had to remove the entity from Home Assistant and add it again but without Use Https and port 80 instead of 443. Now its working.