after some time openHab loses the connection to homegear. This seems to happen because the binding tries to restart the BIN-RPC server. When it does this, the shutdown seems to be not fully complete and the port is not freed when the server is started again:
2017-05-31 15:28:57.925 [DEBUG] [nal.communicator.server.BinRpcServer] - Stopping BIN-RPC server
2017-05-31 15:28:57.927 [DEBUG] [nal.communicator.server.BinRpcServer] - Initializing BIN-RPC server at port 9126
2017-05-31 15:28:57.930 [DEBUG] [ommunicator.AbstractHomematicGateway] - Address already in use (Bind failed)
java.net.BindException: Address already in use (Bind failed)
at java.net.PlainSocketImpl.socketBind(Native Method)[:1.8.0_131]
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)[:1.8.0_131]
at java.net.ServerSocket.bind(ServerSocket.java:375)[:1.8.0_131]
at java.net.ServerSocket.bind(ServerSocket.java:329)[:1.8.0_131]
at org.openhab.binding.homematic.internal.communicator.server.BinRpcNetworkService.(BinRpcNetworkService.java:46)[195:org.openhab.binding.homematic:2.1.0.201705151816]
at org.openhab.binding.homematic.internal.communicator.server.BinRpcServer.start(BinRpcServer.java:42)[195:org.openhab.binding.homematic:2.1.0.201705151816]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.startServers(AbstractHomematicGateway.java:228)[195:org.openhab.binding.homematic:2.1.0.201705151816]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway.access$4(AbstractHomematicGateway.java:222)[195:org.openhab.binding.homematic:2.1.0.201705151816]
at org.openhab.binding.homematic.internal.communicator.AbstractHomematicGateway$ReconnectThread.run(AbstractHomematicGateway.java:903)[195:org.openhab.binding.homematic:2.1.0.201705151816]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
When I check the ports with netstat afterwards, port 9126 is not in use. Raising aliveInterval makes things better as the server is not restarted so often, but the problem persists.
Does anybody else see these problems (and has an idea on how to fix this)?
After a few hours (ca. 14h) the Binding shows this behaviour also to me:
2017-07-06 10:21:26.654 [INFO ] [ommunicator.AbstractHomematicGateway] - No event since 43190 seconds from gateway ‘9cdbbaf1’, restarting RPC server
2017-07-06 10:21:26.659 [WARN ] [ommunicator.AbstractHomematicGateway] - Address already in use (Bind failed)
I’ll try updating homegear today and report
EDIT: Update went fine to version 0.7.5-1247. Will report back when issue continues
got a similar problem with the homematic-binding and a raspberrymatic-ccu. It looses connection due a bad bandwith between openhab2 and the ccu, then failes to reconnect due the bind-failure.:
There is no fix committed as far as I know. But the binding implementation has changed in so far that there is no longer a cyclic reconnect, but the connection is monitored and a reconnect is triggered only when the connection is gone. I never see reconnects at all on my system.
switching to Snapshot did not really work, anyways I did re-set this up again from scratch and now the issues seem to have disappeared. Might be related to training, linking via the CCU and refreshing items while doing so.
Restarted Openhab and tried to create the bridge, now this came up:
2017-11-04 19:04:52.262 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type homematic:bridge.
Is it only working on the latest snapshot? I am running the stable 2.1 openhabian
Binding is displayed in PaperUI under configuration -> bindings
No errors in log, first log is
2017-11-04 19:04:52.262 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type homematic:bridge
Did you try to create the bridge with the UI? If this does not work then maybe something changed in openhab that broke the compatibility from 2.1 to 2.2.
If not, please do so. I did not run OpenHAB 2.1 / Homematic 2.2 Binding, but running the 2.2 Binding with a 2.2 OpenHAB works. And running the 2.1 Binding with openHAB 2.1 worked as well.
I would read that error message as the Bridge object has been changed between 2.1 and 2.2 and the 2.2 Binding is unable to provide a Bridge object of the exact class the 2.1 OpenHAB is expecting. But i may be wrong.