Whatever I change in the settings (timeout, callbackHost, aliveInterval, reconnectInterval) I run into this timeout.
My setup:
CCU2 FW 2.21.10 with 20 connected devices
Openhab2 running on Raspi3
So performance should not be an issue here. Any help on that?
Log:
2016-08-23 04:07:24.064 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
2016-08-23 04:10:54.325 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
2016-08-23 04:15:14.022 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[194:org.openhab.binding.homematic:2.0.0.201608180103]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
OK, thanks. Good to know that I’m not the only one
I’m using motion sensors to switch on lights and there I see a lag as soon as I have these timeouts. Or in other words not really usable for this.
Thanks for the update. Yesterday I updated to latest snapshot and tried timeout with different settings. Unfortunately I still have this messages in my Logfile. It’s not only the log…as soon as I have these logs the update in openHAB is somehow lagged.
Hope you can help in this!
2016-08-28 06:09:05.154 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
2016-08-28 06:11:19.659 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
2016-08-28 06:11:35.670 [ERROR] [nal.communicator.server.XmlRpcServer] - Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)[:1.8.0_101]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:170)[:1.8.0_101]
at java.net.SocketInputStream.read(SocketInputStream.java:141)[:1.8.0_101]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)[:1.8.0_101]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)[:1.8.0_101]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)[:1.8.0_101]
at fi.iki.elonen.NanoHTTPD$HTTPSession.parseBody(NanoHTTPD.java:1113)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at org.openhab.binding.homematic.internal.communicator.server.XmlRpcServer$XmlRpcHTTPD.serve(XmlRpcServer.java:95)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:925)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)[193:org.openhab.binding.homematic:2.0.0.201608210102]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
First of all I have to revise my statement that the execptions are fixed for me after deletion of the XML-Api addon on the homematic.
I had peace for four or five hours and then the exeptions were back again.
So I think that the short periode of “silence” was the result of rebooting the homematic.
Second, I tried the new build you provided: For around two hours no exception (normally I have them every one or two minutes), so that looks really good, but maybe I should be a little careful with this statement
Last of all I’m interested in the technical background here.
As far as I understood, there are two Interfaces to communicate with homematic and homegear.
Homematic supports BIN-Rpc and XML-Rpc, whereas Homegear (and older Homematics?) supports only XML-Rpc.
So if I configure the homematic-binding for a CCU, why does it even try to communicate via XML-Rpc. Is it for backwards compability for older homematics?
The Homematic binding for OH2 supports two communication modes, BIN-RPC and XML-RPC. Homegear supports both methods, if a Homegear gateway is detected, the binding uses BIN-RPC.
For the CCU (or BidCos Service, OCCU, …) it’s different, it depends on the firmware. The RF and WIRED services also supports both methods, the newer HomematicIP service only XML-RPC. So if the binding detects a CCU (or another gateway) with HomematicIP support, it uses XML-RPC, otherwise BIN-RPC.
XML-RPC is documented by EQ-3, BIN-RPC not. So i think XML-RPC is also more future-proof.
The XML-RPC server listens for messages from the gateway. Previously, if a connection is open for a certain period of time, the server closes the connection and opens a new one. That’s the timeout exception you saw.
But that’s not necessarry, now the connection stays open and listens “forever” for new messages. So no timeout anymore and no lost messages.