I am using the garadget binding of which appears to be working fine. However, i get the following multiple times a minute in my log:
Fatal transport error: java.net.SocketTimeoutException: Read timed out
From what I have read, it appears this may just indicate that there was nothing new to report? Is this expected behavior? I seem to be seeing it more since updating to the latest offline oh2 snapshot.
I am doubtful that the openHAB 2 nightly builds pick up the openHAB 1.x addons from the master branch – I was referring to this nightly build, where you would have to grab the JAR from the build artefacts and uninstall the existing in openHAB2, and then add the nightly build version to your addons folder.
I get the same error,
every time I try to send an http POST command to an IP camera:
2016-10-02 19:59:27.568 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.SocketTimeoutException: Read timed out
The command works as expected, but with a huge (~3sec) delay.
The same command works with no errors and no delay from a curl cli command…
No ‘garadget’ binding installed.
I don’t really mind the logged error. But I do mind the delay of the http POST.
my http command is:
There is no obvious reason why there would be a 3 second delay from when the item received the command, and when the HTTP POST is performed. It could be a network configuration issue, overburdened server, or your camera may not be sending an HTTP response properly, or even something else.
The ERROR log message from org.openhab.io.net.http.HttpUtil is sometimes unhelpful, as the far end of the socket might have already closed, producing an IOException that isn’t indicative of a problem. Under OH1 you could alter logback.xml to add a line:
My network configuration is definitely not the issue. (I can extendedly justify but there is no point).
executing
curl "http://blabla"
from the same machine as root or pi user works fine and instantly.
I wrote a bash file with that command, and then an exec binding to that bash, and worked fine and fast.
I also tried:
{exec="*:curl \"http://blabla\" "}
gives me a line in the log file that says: executed commandLine 'curl "http://blabla" '
but nothing actually happens!
and finally I tried
{exec="*:/bin/sh@@-c@@curl \"http://blabla\" "}
gives me a line in the log file that says: executed commandLine 'curl "http://blabla" '
but works like a charm…
I run OH-1.8.3 on a Raspberry Pi 2, so far I have about 80 items and 15 rules, most of which, work with MQTT and the rest with exec (bash files).
OH runs as root. I don’t remember when and why I did that.
It may be that the binding is creating a new HTTP client for each POST and leaving open too many connections to the camera (at least this stackoverflow suggests that might be the issue). On Linux / MacOSX, you could run netstat -an at a prompt right at the time the exception is logged to see if there are many sockets open to the camera.
If that’s the issue, then the binding would have to refactored a bit to not invoke this line for every HTTP method, but instead reuse the HttpClient in some way.
Is this issue fixed or is there a workaround?
I get this which seems related:
…[ERROR] [org.openhab.io.net.http.HttpUtil ] - Fatal transport error: java.net.SocketTimeoutException: Read timed out
…[ERROR] [ab.binding.http.internal.HttpBinding] - No response received from 'http://…
I also get exact same behavior for: {http=">[ON:POST:http://user:password@192.168.x.x/nightmodecontrol.cgi?IRled=1]"}
Command is executed with a 3 secs delay and I get the error in the log: Fatal transport error: java.net.SocketTimeoutException: Read timed out
Any update on a fix for this?