Myopenhab Socket.IO error, app not working

Hi,

App is configured through myopenhab and was working just fine until today.
I haven’t changed anything.
Log now is outputting this:

2017-09-22 14:43:58.148 [INFO ] [o.o.i.o.internal.CloudClient ] - Connected to the openHAB Cloud service (UUID = ***********, local base URL = http://localhost:8080)
2017-09-22 14:44:00.961 [ERROR] [o.o.i.o.internal.CloudClient ] - Socket.IO error: io.socket.engineio.client.EngineIOException: xhr post error
2017-09-22 14:44:00.976 [INFO ] [o.o.i.o.internal.CloudClient ] - Disconnected from the openHAB Cloud service (UUID = **********, local base URL = http://localhost:8080)
2017-09-22 14:45:08.798 [INFO ] [o.o.i.o.internal.CloudClient ] - Connected to the openHAB Cloud service (UUID = **********, local base URL = http://localhost:8080)

Any ideas? Anyone experience anything similar?

Its been a rough couple of days for our infrastructure :frowning: There was an issue with the myopenhab servers over the last few hours, we have brought them back online, but there is still an issue with proxying requests back to a users’s OH. We are actively working on it now.

Thank you for all the work.

@digitaldan

It happend again!

see here:

Link1
Link2

I had this error (yesterday evening (21:29)) , too!

2017-11-23 21:24:47.714 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxx, base URL = http://localhost:8080)
2017-11-23 21:29:17.591 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr poll error
	at io.socket.engineio.client.Transport.onError(Transport.java:71) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:124) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.thread.EventThread$2.run(EventThread.java:80) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: java.net.SocketTimeoutException: connect timed out
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:?]
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) ~[?:?]
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:214) ~[?:?]
	... 1 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:?]
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[?:?]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
	at java.net.Socket.connect(Socket.java:589) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[?:?]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[?:?]
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:781) ~[?:?]
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:2966) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFields(HttpsURLConnectionImpl.java:283) ~[?:?]
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:211) ~[?:?]
	... 1 more
2017-11-23 21:29:17.691 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxxxxx, base URL = http://localhost:8080)
2017-11-23 21:30:20.392 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr poll error
	at io.socket.engineio.client.Transport.onError(Transport.java:71) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:124) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at io.socket.thread.EventThread$2.run(EventThread.java:80) [219:org.openhab.io.openhabcloud:2.2.0.201709152241]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: java.net.SocketTimeoutException: connect timed out
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:?]
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) ~[?:?]
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:214) ~[?:?]
	... 1 more
Caused by: java.net.SocketTimeoutException: connect timed out
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:?]
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[?:?]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
	at java.net.Socket.connect(Socket.java:589) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[?:?]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[?:?]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[?:?]
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:781) ~[?:?]
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:?]
	at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:2966) ~[?:?]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFields(HttpsURLConnectionImpl.java:283) ~[?:?]
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:211) ~[?:?]
	... 1 more
2017-11-23 21:30:20.411 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxxxx, base URL = http://localhost:8080)
2017-11-23 21:31:42.385 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxxx, base URL = http://localhost:8080)

Sometimes I get exactly the same messages. I am not sure if it is a good advise too disable logging for the cloudconnector. These messages really annoys me…

2018-01-03 13:43:57.302 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: websocket error
        at io.socket.engineio.client.Transport.onError(Transport.java:71) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.engineio.client.transports.WebSocket.access$500(WebSocket.java:28) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.engineio.client.transports.WebSocket$2$5.run(WebSocket.java:150) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.thread.EventThread$2.run(EventThread.java:80) [254:org.openhab.io.openhabcloud:2.2.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.EOFException
        at okio.RealBufferedSource.require(RealBufferedSource.java:59) ~[?:?]
        at okio.RealBufferedSource.readByte(RealBufferedSource.java:72) ~[?:?]
        at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:115) ~[?:?]
        at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:104) ~[?:?]
        at okhttp3.internal.ws.RealWebSocket.readMessage(RealWebSocket.java:97) ~[?:?]
        at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:152) ~[?:?]
        at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41) ~[?:?]
        at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97) ~[?:?]
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) ~[?:?]
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
        ... 3 more
2018-01-03 13:43:57.373 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)
2018-01-03 16:54:06.870 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)
2018-01-03 16:54:08.332 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr post error
        at io.socket.engineio.client.Transport.onError(Transport.java:71) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.engineio.client.transports.PollingXHR.access$000(PollingXHR.java:19) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.engineio.client.transports.PollingXHR$4$1.run(PollingXHR.java:88) [254:org.openhab.io.openhabcloud:2.2.0]
        at io.socket.thread.EventThread$2.run(EventThread.java:80) [254:org.openhab.io.openhabcloud:2.2.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
        at java.net.Socket.connect(Socket.java:589) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[?:?]
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:?]
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:?]
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:?]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) ~[?:?]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) ~[?:?]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:?]
        at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:206) ~[?:?]
        ... 1 more
2018-01-03 16:54:08.366 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)
2018-01-03 16:56:12.488 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxx, base URL = http://localhost:8080)

Same issue here… :frowning: myopenhab doesn’t work for me since a month or so.
Version: 2.3.0-SNAPSHOT (#1204)
I’ve even created a new account and generated new UUID and Secret files.
Still nothing, so I’m assuming it’s the server issue.

cc: @digitaldan

==> /var/log/openhab2/openhab.log <==

2018-02-05 22:10:30.986 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}

io.socket.engineio.client.EngineIOException: xhr post error

	at io.socket.engineio.client.Transport.onError(Transport.java:71) [267:org.openhab.io.openhabcloud:2.3.0.201802031138]

	at io.socket.engineio.client.transports.PollingXHR.access$000(PollingXHR.java:19) [267:org.openhab.io.openhabcloud:2.3.0.201802031138]

	at io.socket.engineio.client.transports.PollingXHR$4$1.run(PollingXHR.java:88) [267:org.openhab.io.openhabcloud:2.3.0.201802031138]

	at io.socket.thread.EventThread$2.run(EventThread.java:80) [267:org.openhab.io.openhabcloud:2.3.0.201802031138]

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

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

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

Caused by: java.io.IOException: 400

	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:218) ~[?:?]

	... 1 more

2018-02-05 22:10:31.027 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = XXXX, base URL = http://localhost:8080)
==> /var/log/openhab2/openhab.log <==

2018-02-05 22:11:55.296 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://myopenhab.org/ was leaked. Did you forget to close a response body?
==> /var/log/openhab2/openhab.log <==

2018-02-05 22:11:57.388 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = XXX, base URL = http://localhost:8080)

Thank you for your work!

@kubawolanin
did you solve this? I have been getting this error for weeks and am no closer to tracking it down, any ideas?

2018-07-21 22:27:27.134 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}

io.socket.engineio.client.EngineIOException: xhr post error

	at io.socket.engineio.client.Transport.onError(Transport.java:71) [204:org.openhab.io.openhabcloud:2.4.0.201807161453]

	at io.socket.engineio.client.transports.PollingXHR.access$000(PollingXHR.java:19) [204:org.openhab.io.openhabcloud:2.4.0.201807161453]

	at io.socket.engineio.client.transports.PollingXHR$4$1.run(PollingXHR.java:88) [204:org.openhab.io.openhabcloud:2.4.0.201807161453]

	at io.socket.thread.EventThread$2.run(EventThread.java:80) [204:org.openhab.io.openhabcloud:2.4.0.201807161453]

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

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

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

Caused by: java.io.IOException: 400

	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:218) ~[?:?]

	... 1 more

Plus one here. I get this error repeatedly, and myopenhab.org shows me offline even though it says it is reconnecting. Everything works fine locally, but I have no cloud access (or Alexa or Google Assistant). Did anyone find the cause and solution?

2018-10-24 21:09:38.575 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
io.socket.engineio.client.EngineIOException: xhr poll error
	at io.socket.engineio.client.Transport.onError(Transport.java:71) [206:org.openhab.io.openhabcloud:2.4.0.M4]
	at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19) [206:org.openhab.io.openhabcloud:2.4.0.M4]
	at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:124) [206:org.openhab.io.openhabcloud:2.4.0.M4]
	at io.socket.thread.EventThread$2.run(EventThread.java:80) [206:org.openhab.io.openhabcloud:2.4.0.M4]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.io.IOException: 502
	at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:218) ~[?:?]
	... 1 more
2018-10-24 21:09:38.591 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = c0fbf734-a52d-40a5-8d0b-14e92a6a9ccf, base URL = http://localhost:8080)
2018-10-24 21:10:20.686 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = c0fbf734-a52d-40a5-8d0b-14e92a6a9ccf, base URL = http://localhost:8080)

Usually you can get your instance back online by restarting openHAB or just the Cloud Connector bundle using the Console.

openhab> bundle:list|grep Cloud
246 │ Active   │  80 │ 2.5.0.201901022358     │ openHAB Cloud Connector Bundle
openhab> bundle:restart 246

I tried updating the Cloud Connector bundle dependencies to resolve it but that didn’t help:

After some more debugging it looks like the Cloud doesn’t properly register openHAB instances as online when it goes offline/online several times in a row.