I get the following error on a sendHttpGetRequest() in my rule on openHAB2.1.0 (build780):
2017-02-07 15:54:42.041 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: java.nio.channels.ClosedChannelException
RULE
rule triggerUDA_test
when
Item Switch_UDA_Test changed
then
var String get_sessiontoken=sendHttpGetRequest('https://xxx.xxx.x.xx:8080/json/system/loginApplication?loginToken=xxx')
logDebug("UDA_Test","SessionToken is " + get_sessiontoken)
end
The sessiontoken in the log is null of course.
Copying https://xxx.xxx.x.xx:8080/json/system/loginApplication?loginToken=xxx
into my browser returns me with the expected JSON string.
Replacing the characters ? with %3F and the = with %3D in the string with didnāt help me either.
I donāt see a problem with your rule, but it might be that the server at xxx.xxx.x.xx and openHAB do not agree on SSL CA certificates, and the socket is being closed right after a failed SSL negotiation.
Thanks for the response @watou . Iāve set Firefox to accept all SSL negotiation, since adding a certificate to digitalSTROM still canāt be done (as far as I know). Firefox isnāt asking for any SSL trust confirmation when executing the URL in Firefox.
Is there a way I can set openHAB to trust this server? Or is there another way to work around this?
There is probably an answer here on the forum, or Google. I know the issue pops up occasionally, but I donāt have steps myself to solve it. It used to be an issue for the Netatmo 1.x binding. Hope some of this helps!
but I had to install the specific (by digitalSTROM.org) self-signed certificate in the Java environment. So I managed to download the certificate fromm the security options of my Firefox browser.
Steps to follow for digitalSTROM-users:
read and understand the solution described in Netatmo Netatmo 1.x binding Do not download the Netatmo certificate, and do not install it. This must be done for the digitalSTROM server in the following steps:
Approach your digitalSTROM server at port :8080 and trust it
Open your options in Firefox, go Advanced options >> Certificates >> View Certificates:
Go to the āOtherā Tab >> Export the digitalSTROM certificate
Now follow the instructions in Netatmo 1.x binding(skip downloading and installing the netatmo cert. because your using your digitialSTROM cert.) but replace the install instructions according to your own situation, e.g. in my case , in the Windows CMD environment, starting from my JDK Java-path on: