pknx icon indicating copy to clipboard operation
pknx copied to clipboard

Reconnection goes it perpetual failure after reconnect attempt fails

Open elupus opened this issue 7 years ago • 9 comments

I've got a problem with knxip where the connection to the router temporarily goes down. This likely triggers the disconnect(), connect() pattern where the connect() request likely fails. After which i get these exceptions continuously logged and it doesn't recover even if connection comes back up.

Jun 19 19:49:35 hass hass[27706]: 2017-06-19 19:49:35 INFO (Thread-7) [root] Data server already running, not starting again
Jun 19 19:49:35 hass hass[27706]: 2017-06-19 19:49:35 INFO (Thread-4) [root] Data server already running, not starting again
Jun 19 19:49:35 hass hass[27706]: 2017-06-19 19:49:35 INFO (Thread-5) [root] Data server already running, not starting again
Jun 19 19:49:37 hass hass[27706]: 2017-06-19 19:49:37 INFO (Thread-12) [custom_components.nibe] Requesting parameters for system 36563
Jun 19 19:49:37 hass hass[27706]: 2017-06-19 19:49:37 ERROR (Thread-5) [root] KNX/IP gateway did not respond to connect request
Jun 19 19:49:37 hass hass[27706]: 2017-06-19 19:49:37 ERROR (Thread-7) [root] KNX/IP gateway did not respond to connect request
Jun 19 19:49:37 hass hass[27706]: 2017-06-19 19:49:37 ERROR (Thread-4) [root] KNX/IP gateway did not respond to connect request
Jun 19 19:49:40 hass hass[27706]: Traceback (most recent call last):
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/env/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
Jun 19 19:49:40 hass hass[27706]:     yield from self.hass.async_add_job(self.update)
Jun 19 19:49:40 hass hass[27706]:   File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
Jun 19 19:49:40 hass hass[27706]:     yield self  # This tells Task to wait for completion.
Jun 19 19:49:40 hass hass[27706]:   File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
Jun 19 19:49:40 hass hass[27706]:     future.result()
Jun 19 19:49:40 hass hass[27706]:   File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
Jun 19 19:49:40 hass hass[27706]:     raise self._exception
Jun 19 19:49:40 hass hass[27706]:   File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
Jun 19 19:49:40 hass hass[27706]:     result = self.fn(*self.args, **self.kwargs)
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/env/lib/python3.5/site-packages/homeassistant/components/knx.py", line 192, in update
Jun 19 19:49:40 hass hass[27706]:     self.state_address, use_cache=self.cache)
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/.homeassistant/deps/knxip/ip.py", line 557, in group_read
Jun 19 19:49:40 hass hass[27706]:     self.send_tunnelling_request(cemi)
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/.homeassistant/deps/knxip/ip.py", line 539, in send_tunnelling_request
Jun 19 19:49:40 hass hass[27706]:     self.disconnect()
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/.homeassistant/deps/knxip/ip.py", line 387, in disconnect
Jun 19 19:49:40 hass hass[27706]:     frame.body = self.hpai_body()
Jun 19 19:49:40 hass hass[27706]:   File "/home/homeassistant/.homeassistant/deps/knxip/ip.py", line 497, in hpai_body
Jun 19 19:49:40 hass hass[27706]:     body.extend(ip_to_array(self.control_socket.getsockname()[0]))
Jun 19 19:49:40 hass hass[27706]: AttributeError: 'NoneType' object has no attribute 'getsockname'
Jun 19 19:49:40 hass hass[27706]: Traceback (most recent call last):

elupus avatar Jun 19 '17 19:06 elupus