Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log flooded with "disconnected from Rflink, reconnecting", HA unresponsive. #16516

Closed
wmnl25 opened this issue Sep 9, 2018 · 4 comments
Closed

Comments

@wmnl25
Copy link

wmnl25 commented Sep 9, 2018

Home Assistant release with the issue:
0.77.3 (updated today, previous installed version (0.75.x) was the same.

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):
Ubuntu/venv.

Component/platform:
https://www.home-assistant.io/components/rflink/ . TCP mode.

Description of problem:
Yesterday I replaced a raspberry Pi 1 with a raspberry zero W. This raspberry acts as an serial gateway with ser2net for rflink, mysensors and P1. The log is flooded by rflink connection errors:

2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:05 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 12:49:06 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting

Homeassistant gets unresponsive and hangs. That's why I disabled the rflink compononent for now.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

# RFLINK 
rflink:
port: 6001
host: 10.7.7.128
reconnect_interval: 30
wait_for_ack: False

reconnect_interval: and wait_for_ack: were added today. They do not seem to make any difference.

/etc/ser2net.conf:

#RFLINK
6001:raw:600:/dev/ttyUSB1:57600 8DATABITS NONE 1STOPBIT
#P1
6002:raw:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT

The previous ser2net Pi had a wired connection. These "disconnected from Rflink, reconnecting" errors were showing frequently (like every 30 mins or so)., but not causing any serious effects.

@wmnl25
Copy link
Author

wmnl25 commented Sep 9, 2018

When the ser2net server is stopped, behaviour is as expected. DSMR starts giving connection errors also and rflink honours the Reconnect_interval of 30 seconds:

`2018-09-09 13:25:29 ERROR (MainThread) [homeassistant.components.sensor.dsmr] Error connecting to DSMR

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/dsmr.py", line 192, in connect_and_reconnect
    reader_factory())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 778, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.6/asyncio/base_events.py", line 765, in create_connection
    yield from self.sock_connect(sock, address)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 450, in sock_connect
    return (yield from fut)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 480, in _sock_connect_cb
    raise OSError(err, 'Connect call failed %s' % (address,))
ConnectionRefusedError: [Errno 111] Connect call failed ('10.7.7.128', 6002)

2018-09-09 13:25:59 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting

2018-09-09 13:25:59 ERROR (MainThread) [homeassistant.components.rflink] Error connecting to Rflink, reconnecting in 30`

However, after starting ser2net service on the Pi, the flooding resumes and reconnect_interval seems to be ignored:

2018-09-09 13:28:24 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:24 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2018-09-09 13:28:25 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting```

@wmnl25
Copy link
Author

wmnl25 commented Sep 9, 2018

Ok - I found the cause. There was a problem with the ttyUSB1 permission on the ser2net Pi. DSMR was on ttyUSB0 and working fine, RFlink on ttyUSB1. Ser2net would close the connection immediately after HA opened it. Fixing the ttyUSB1 permissions also fixed the flooding.

However, honouring the reconnect interval in these cases still might not be a bad idea to prevent flooding and hanging.

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloobbot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants