mvalla / openhab-addons

Add-ons for openHAB
Eclipse Public License 2.0
24 stars 16 forks source link

disconnection from gateway is not detected immediately #17

Closed mvalla closed 5 years ago

mvalla commented 5 years ago

test: disconnect LAN cable from gateway, OWN binding keep sending keepalive messages on the monitoring socket with no errors until 16min later the socket returns an error

log:

// last MON msg received rom gw
19:00:34.560 [INFO ] [org.openwebnet.OpenGatewayBus$a     ] - MON RECEIVED  <<<<<<<<<<< *1*1*25##
[...]
// keepalive is still sent with no error
19:01:25.119 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - ##gw-openwebnet-conn## sending MON keepalive ACK 
19:01:25.125 [DEBUG] [org.openwebnet.bus.MyHomeConnection ] - MON SENDING    ======>>>>>> *#*1##
[...]
// >16mins later the monitoring connection returns error (No route to host - Read failed / Host Unreachable)
19:16:53.148 [DEBUG] [g.openwebnet.bus.MyHomeJavaConnector] - ##gw-openwebnet-connector## readMonitoring() Exception: No route to host (Read failed)
19:16:53.153 [DEBUG] [org.openwebnet.OpenGatewayBus$a     ] - ##gw-openwebnet-BUSReceiveThread## @@@ WARN @@@ IOException on monitor thread: No route to host (Read failed)
19:16:53.158 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## Sleeping 2500ms before re-connecting...
19:16:53.158 [WARN ] [bnet.handler.OpenWebNetBridgeHandler] - ==OWN==  CONNECTION ERROR: Connection error (IOException). Check network and gateway thing Configuration Parameters
19:16:55.662 [DEBUG] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...slept 2500ms, now trying to re-connect...
19:16:55.665 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket....  (192.168.x.xx:20000)
19:16:58.829 [WARN ] [org.openwebnet.OpenGatewayBus       ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable)
gilbertococchi commented 5 years ago

Hi Massimo, something similar happened to me as well without having disconnected anything, either the HomeServer nor OpenHab2.

2018-09-06 00:45:34.812 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:45:34.817 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:46:34.822 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:46:34.826 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:46:37.832 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:46:37.835 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:47:37.837 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:47:37.840 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:47:40.842 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:47:40.845 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:48:40.848 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:48:40.853 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:48:43.853 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:48:43.857 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:49:43.861 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:49:43.863 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:49:46.863 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:49:46.867 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:50:46.871 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:50:46.874 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:50:49.873 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:50:49.876 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:51:49.878 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:51:49.882 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:51:52.883 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:51:52.886 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:52:52.889 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:52:52.892 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:52:55.893 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:52:55.896 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:53:55.899 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:53:55.903 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:53:58.904 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:53:58.907 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting... 2018-09-06 00:54:58.910 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...slept 60000ms, now trying to re-connect... 2018-09-06 00:54:58.914 [DEBUG] [g.openwebnet.bus.MyHomeSocketFactory] - ##gw-openwebnet-socket## Trying openMonitorSession socket.... (192.168.1.249:20000) 2018-09-06 00:55:01.915 [WARN ] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## ...re-connect FAILED. Exception: No route to host (Host unreachable) 2018-09-06 00:55:01.917 [DEBUG] [org.openwebnet.OpenGatewayBus ] - ##gw-openwebnet-BUS## Sleeping 60000ms before re-connecting...

It looked likes the Bticino HomeSever was unreachable and I had to reboot it to make it work.

Also the MyHomeApp was not working during the issue, not sure it's related with OpenHab2 at all.

mvalla commented 5 years ago

fixed in beta8