question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version 3.0 doesn't reconnect after error

See original GitHub issue

Hello,

i got this error in logs:

2020-12-08 17:24:25 ERROR (MainThread) [custom_components.remote_homeassistant] failed to fetch instance info
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('192.168.1.246', 8123)

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

Traceback (most recent call last):
  File "/config/custom_components/remote_homeassistant/__init__.py", line 366, in _async_instance_get_info
    return await async_get_discovery_info(
  File "/config/custom_components/remote_homeassistant/rest_api.py", line 38, in async_get_discovery_info
    async with session.get(url, headers=headers) as resp:
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 1124, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 527, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 541, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 898, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1057, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1026, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 981, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host hassio-slave1-wifi.lan:8123 ssl:default [Connect call failed ('192.168.1.246', 8123)]
2020-12-08 17:24:25 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/remote_homeassistant/__init__.py", line 399, in async_connect
    if not (info or _async_instance_id_match(info)):
  File "/config/custom_components/remote_homeassistant/__init__.py", line 381, in _async_instance_id_match
    if info["uuid"] != self._entry.unique_id:
TypeError: 'NoneType' object is not subscriptable

Then there is no reconnection with slave device. Have to reload integration or restart HA

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
postlundcommented, Dec 9, 2020

I will try to replicate if possible later tonight and see if I can fix that.

2reactions
postlundcommented, Dec 8, 2020

I will take a look later tonight.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto reconnect doesn't work properly · Issue #1479
Mongoose 3.6.9 doesn't seem to have working auto-reconnect. Here is my test case against a local MongoDB server which I kill to test...
Read more >
Unable to reconnect to room - photon forum
Hello, I have an application that uses Photon Realtime version 3 in Unity version 2018.2.12f1 on WebGL and I require help with the...
Read more >
Reliably reconnect to MongoDB - node.js
I have a node application that uses MongoDB. The problem I have is that if the MongoDB server goes down for any reason,...
Read more >
If your computer doesn't recognize your iPhone or iPad
If that doesn't help, disconnect your device and all other USB devices and accessories from your computer. Then reconnect only your device.
Read more >
Remote Desktop Error "You have been disconnected ...
I completed some work and disconnected again in the evening. This morning, when I tried to reconnect, I got the same error. Based...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found