when I try tu connect from my second openhab 3 Server (3.2.0M4) to my main server (3.2.0M4) I always get a communication error. In the debug log I see that there is a timeout reading the items via the rest API.
Blockquote
2021-11-30 11:23:20.176 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - The remopte server redirected the request to this URL: http://192.168.1.84:8080/rest/
2021-11-30 11:23:20.177 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Request GET http://192.168.1.84:8080/rest/
2021-11-30 11:23:20.697 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - REST API version = 5
2021-11-30 11:23:20.698 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - REST API items = http://192.168.1.84:8080/rest/items
2021-11-30 11:23:20.699 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - REST API things = http://192.168.1.84:8080/rest/things
2021-11-30 11:23:20.699 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - REST API events = http://192.168.1.84:8080/rest/events
2021-11-30 11:23:20.700 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - topic namespace = openhab
2021-11-30 11:23:20.701 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Request GET http://192.168.1.84:8080/rest/items?recursive=false&fields=name,type,groupType,state,stateDescription
2021-11-30 11:23:22.224 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - Failed to get the list of remote items using the items REST API: java.util.concurrent.TimeoutException
2021-11-30 11:23:22.228 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Closing EventSource
2021-11-30 11:23:22.228 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - EventSource stopped
2021-11-30 11:23:25.703 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - Failed to get the list of remote items using the items REST API: java.util.concurrent.TimeoutException
Blockquote
When I try to send command via curl I get the result after approximately 3 seconds (its a long list of items on my main server).
So I think the timeout for this step is far to low.
Is there any workaround to set this timeout?
thanks for your fast reply!!
I checked the timestamps in log
2021-11-30 15:01:09.140 [DEBUG] [nternal.rest.RemoteopenhabRestClient] - Request GET http://192.168.1.84:8080/rest/items?recursive=false&fields=name,type,groupType,state,stateDescription
2021-11-30 15:01:14.155 [DEBUG] [l.handler.RemoteopenhabBridgeHandler] - Failed to get the list of remote items using the items REST API: java.util.concurrent.TimeoutException
so it’s about 5 seconds. Still more than 3
What I saw is that the whole request in putty takes about 15 to 20 seconds to come to an end.
still less than 30 secs which is the constant that is being used for the timeout value.
Is the JSON that is returned valid JSON ? Asking because there are two execeptions mentioned in the code ( RemoteopenhabException | JsonSyntaxException ) - but the text says timeout.
We are in the same boat, there is an issue with the REST API on Items. I’m having issues also using the MAP binding - so I had to remove it but it stops me in my tracks in rolling out sitemaps and habpanel until this is addressed.