This page last changed on Jan 15, 2016 by ice3362.

Hi all,

I've been having problems connecting to an http server using NTLM authentication. As far as I can tell, OR should be able to support authentication using NTLM, but I get the following error.

2016-01-13 13:47:31,571 WARN [Polling thread for sensor: sensor1]: Authentication scheme ntlm not supported
2016-01-13 13:47:31,573 WARN [Polling thread for sensor: sensor1]: Authentication error: Unable to respond to any of these challenges: {ntlm=WWW-Authenticate: NTLM, negotiate=WWW-Authenticate: Negotiate}
2016-01-13 13:47:31,575 ERROR [Polling thread for sensor: sensor1]: ClientProtocolException when executing HTTP method
org.apache.http.client.HttpResponseException: Unauthorized
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(
at org.openremote.controller.protocol.http.HttpGetCommand.requestURL(

Here is the part of the log that shows the settings for the HTTP command I created in designer:

2016-01-13 16:38:41,163 DEBUG [main]: Building HttGetCommand
2016-01-13 16:38:41,167 DEBUG [main]: HttpGetCommand: username = COMPUTER/USER
2016-01-13 16:38:41,168 DEBUG [main]: HttpGetCommand: regex = (on|off)
2016-01-13 16:38:41,169 DEBUG [main]: HttpGetCommand: pollingInterval = 10s
2016-01-13 16:38:41,170 DEBUG [main]: HttpGetCommand: method = GET
2016-01-13 16:38:41,171 DEBUG [main]: HttpGetCommand: contentTyoe = application/text
2016-01-13 16:38:41,172 DEBUG [main]: HttpGetCommand: password = PASS
2016-01-13 16:38:41,173 DEBUG [main]: HttpGetCommand: url = http://COMPUTER:PORT/?command=power

curl works with NTLM authentication using the same credentials. I get expected result every time, which is the power state of a device connected to COMPUTER. this even works if I use it in a shell execution protocol:

curl -X GET "http://COMPUTER:PORT/?command=power" --ntlm -u COMPUTER/USER:PASS

I am using OR on a raspberry pi running raspbian 'jessie'. Java SDK 1.8.0

can anyone help me determine why NTLM auth is not working with the HTTP command in OR?

Thanks in advance!

Document generated by Confluence on Jun 05, 2016 09:32