Remote Openhab Binding API token authentication error

Hi All,

I am having issues with setting up my OH3 remote openhab server in my local network.
Both the local and remote OH3 servers are running 3.4.0 M2.

Here is the Remote Openhab Server Thing config on my local server:

I generated my API token on my remote OH Server and copied it over to the config above.

When I try to enable the Remote OH Server Thing on my local OH Server, I get a Comms error as follows:

And with the logs at DEBUG, I get the following:

2022-09-26 12:52:26.776 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:server:451da4d58b' updated: INITIALIZING

2022-09-26 12:52:26.784 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:server:451da4d58b' changed from UNINITIALIZED (DISABLED) to INITIALIZING

2022-09-26 12:52:26.788 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - Initializing remote openHAB handler for bridge remoteopenhab:server:451da4d58b

2022-09-26 12:52:26.790 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - REST URL = https://192.168.91.235:8443/rest/

2022-09-26 12:52:26.791 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:server:451da4d58b' updated: UNKNOWN

2022-09-26 12:52:26.792 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:server:451da4d58b' changed from INITIALIZING to UNKNOWN

2022-09-26 12:52:26.794 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c' updated: INITIALIZING

2022-09-26 12:52:26.794 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - Try the root REST API...

2022-09-26 12:52:26.795 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Request GET https://192.168.91.235:8443/rest/

2022-09-26 12:52:26.795 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2022-09-26 12:52:26.800 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221' updated: INITIALIZING

2022-09-26 12:52:26.801 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2022-09-26 12:52:26.802 [DEBUG] [al.handler.RemoteopenhabThingHandler] - initializing remote openHAB handler for thing remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221

2022-09-26 12:52:26.804 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221' updated: **OFFLINE** (BRIDGE_OFFLINE)

2022-09-26 12:52:26.805 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221' changed from INITIALIZING to **OFFLINE** (BRIDGE_OFFLINE)

2022-09-26 12:52:26.811 [DEBUG] [al.handler.RemoteopenhabThingHandler] - initializing remote openHAB handler for thing remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c

2022-09-26 12:52:26.829 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c' updated: **OFFLINE** (BRIDGE_OFFLINE)

2022-09-26 12:52:26.829 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c' changed from INITIALIZING to **OFFLINE** (BRIDGE_OFFLINE)

2022-09-26 12:52:27.061 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - checkConnection for thing remoteopenhab:server:451da4d58b failed: Failed to execute the root REST API

org.openhab.binding.remoteopenhab.internal.exceptions.RemoteopenhabException: null

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.tryApi(RemoteopenhabRestClient.java:179) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.checkConnection(RemoteopenhabBridgeHandler.java:376) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.handler.RemoteopenhabBridgeHandler.lambda$0(RemoteopenhabBridgeHandler.java:182) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]

at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

at java.lang.Thread.run(Thread.java:829) [?:?]

Caused by: org.openhab.binding.remoteopenhab.internal.exceptions.RemoteopenhabException: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.executeUrl(RemoteopenhabRestClient.java:643) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.executeGetUrl(RemoteopenhabRestClient.java:563) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.tryApi(RemoteopenhabRestClient.java:162) ~[?:?]

... 8 more

Caused by: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]

at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]

at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:730) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.executeUrl(RemoteopenhabRestClient.java:612) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.executeGetUrl(RemoteopenhabRestClient.java:563) ~[?:?]

at org.openhab.binding.remoteopenhab.internal.rest.RemoteopenhabRestClient.tryApi(RemoteopenhabRestClient.java:162) ~[?:?]

... 8 more

Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:164) ~[?:?]

at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[?:?]

at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[?:?]

at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481) ~[?:?]

at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:461) ~[?:?]

at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:424) ~[?:?]

at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:374) ~[?:?]

at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1186) ~[?:?]

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1559) ~[?:?]

at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:208) ~[?:?]

at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:148) ~[?:?]

at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:80) ~[?:?]

at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:131) ~[?:?]

at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:172) ~[?:?]

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[?:?]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[?:?]

at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:555) ~[?:?]

at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:410) ~[?:?]

at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:164) ~[?:?]

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[?:?]

at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[?:?]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[?:?]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[?:?]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[?:?]

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[?:?]

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[?:?]

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[?:?]

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[?:?]

... 1 more

2022-09-26 12:52:27.083 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Closing EventSource

2022-09-26 12:52:27.083 [DEBUG] [al.handler.RemoteopenhabThingHandler] - bridgeStatusChanged **OFFLINE** (COMMUNICATION_ERROR): @text/exception.root-rest-api-failed for thing remoteopenhab:thing:451da4d58b:rfxcom_bridge_3e75bf8f1c

2022-09-26 12:52:27.084 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'remoteopenhab:server:451da4d58b' updated: **OFFLINE** (COMMUNICATION_ERROR): Failed to **execute** the root REST API

2022-09-26 12:52:27.084 [DEBUG] [al.handler.RemoteopenhabThingHandler] - bridgeStatusChanged **OFFLINE** (COMMUNICATION_ERROR): @text/exception.root-rest-api-failed for thing remoteopenhab:thing:451da4d58b:rfxcom_blinds1_3e75bf8f1c_81fc023221

2022-09-26 12:52:27.084 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - EventSource stopped

2022-09-26 12:52:27.084 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'remoteopenhab:server:451da4d58b' changed from **UNKNOWN** to **OFFLINE** (COMMUNICATION_ERROR): Failed to **execute** the root REST API

Any ideas as to why this issue is happening?

Thanks!

Remove username and password parametees and it should work better.

Thank-you @Lolodomo!
That did the trick!