Open paulianttila opened 6 years ago
similar problem here:
2017-11-25 10:28:27.468 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: io.socket.engineio.client.EngineIOException: xhr poll error 2017-11-25 10:28:27.478 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 01a9e9cf-905a-485b-8629-7576b8a822da, base URL = http://localhost:8080)
and after a while:
2017-11-25 10:31:55.439 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 01a9e9cf-905a-485b-8629-7576b8a822da, base URL = http://localhost:8080)
any new insights? Thanks, Patrick
Same error here with first regular occurrence about six hours ago. Trying to access my openHAB server through openHAB Cloud results in 502 Bad Gateway. Already reinstalled cloud service, checked secret keys, restarted openHAB, to no avail. Wish you good luck with finding the error! Best regards Pav
There's a discussion going on at https://community.openhab.org/t/openhab-2-losing-cloud-connection/36550/8 describing the error.
There's also an SSL certificate validation error for www.myopenhab.org which uses a wrong certificate.
I'm experiencing the same issue for over a month of trial. Tried with a fresh account, generated new UUID and secret files.
I've observed that when I try to access https://myopenhab.org/start/index, in my logs I see "System started" rules being executed. It may be a coincidence, though.
More details in this post: https://community.openhab.org/t/myopenhab-socket-io-error-app-not-working/34420/6?u=kubawolanin
cc: @marziman @digitaldan
This is still an issue. See also my https://github.com/openhab/openhab2-addons/pull/4500#issuecomment-451695654:
It looks like the Cloud is not properly keeping track of offline/online instances.
According to the CloudClient
logging the connection should still be up after several disconnects:
2019-01-05 19:38:59.570 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected
2019-01-05 19:38:59.570 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, base URL = http://localhost:8080)
2019-01-05 19:39:03.892 [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:63) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:26) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:140) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.thread.EventThread$2.run(EventThread.java:80) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
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.onResponse(PollingXHR.java:234) ~[?:?]
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) ~[?:?]
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
... 3 more
2019-01-05 19:39:03.897 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected
2019-01-05 19:39:03.897 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, base URL = http://localhost:8080)
2019-01-05 19:39:13.426 [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:63) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:26) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:140) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
at io.socket.thread.EventThread$2.run(EventThread.java:80) [246:org.openhab.io.openhabcloud:2.5.0.201901022358]
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.onResponse(PollingXHR.java:234) ~[?:?]
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) ~[?:?]
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
... 3 more
2019-01-05 19:39:13.430 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected
2019-01-05 19:39:13.431 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, base URL = http://localhost:8080)
2019-01-05 19:39:21.398 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO connected
2019-01-05 19:39:21.398 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, base URL = http://localhost:8080)
Also if I raise logging on io.socket
there is a connection because it ping/pongs normally:
2019-01-05 21:59:10.352 [DEBUG] [io.socket.engineio.client.Socket ] - writing ping packet - expecting pong within 60000ms
2019-01-05 21:59:10.353 [DEBUG] [io.socket.engineio.client.Socket ] - flushing 1 packets in socket
2019-01-05 21:59:10.379 [DEBUG] [io.socket.engineio.client.Socket ] - socket received: type 'pong', data 'null'
2019-01-05 21:59:35.382 [DEBUG] [io.socket.engineio.client.Socket ] - writing ping packet - expecting pong within 60000ms
2019-01-05 21:59:35.384 [DEBUG] [io.socket.engineio.client.Socket ] - flushing 1 packets in socket
2019-01-05 21:59:35.418 [DEBUG] [io.socket.engineio.client.Socket ] - socket received: type 'pong', data 'null'
The cloud keeps showing:
As soon as you bundle:restart the openHAB Cloud Connector Bundle
the Cloud again properly registers the instance as online:
There are already a few community topics and issues about this:
The openHAB Cloud Notification Actions also work while the Cloud thinks the instance is offline. This is another indicator that the connection is working properly (see community topic).
Can you have a look at this @digitaldan, @marziman?
I had the same issue:
2019-05-05 10:52:17.548 [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) [246:org.openhab.io.openhabcloud:2.5.0.M1]
at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:19) [246:org.openhab.io.openhabcloud:2.5.0.M1]
at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:124) [246:org.openhab.io.openhabcloud:2.5.0.M1]
at io.socket.thread.EventThread$2.run(EventThread.java:80) [246:org.openhab.io.openhabcloud:2.5.0.M1]
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
Enabling debug log for io.socket revealted that the client tried to access this URL:
https://myopenhab.org/socket.io/?EIO=3&transport=polling&sid=<my_secret_sid>
The only thing that helped was to delete my openHAB cloud account and recreate it. Before that I executed the "dangerous action" "Delete Items and Events". Maybe the issue is related to that.
Edit: Recreating didn't help. I have 502 errors again. Just wasted another day with OpenHAB debugging. :-(
I'm running the latest stable 2.4. I'm having the same issue:
Restarting the IO Cloud service temporarily resolves the problem until next glitch on Cloud server.
same issue on latest stable 2.4:
[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) [232:org.openhab.io.openhabcloud:2.4.0] at io.socket.engineio.client.transports.WebSocket.access$500(WebSocket.java:28) [232:org.openhab.io.openhabcloud:2.4.0] at io.socket.engineio.client.transports.WebSocket$2$5.run(WebSocket.java:150) [232:org.openhab.io.openhabcloud:2.4.0] at io.socket.thread.EventThread$2.run(EventThread.java:80) [232:org.openhab.io.openhabcloud:2.4.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) ~[?:?] at java.net.SocketInputStream.socketRead(Unknown Source) ~[?:?] at java.net.SocketInputStream.read(Unknown Source) ~[?:?] at java.net.SocketInputStream.read(Unknown Source) ~[?:?] at sun.security.ssl.InputRecord.readFully(Unknown Source) ~[?:?] at sun.security.ssl.InputRecord.read(Unknown Source) ~[?:?] at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) ~[?:?] at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source) ~[?:?] at sun.security.ssl.AppInputStream.read(Unknown Source) ~[?:?] at okio.Okio$2.read(Okio.java:138) ~[?:?] at okio.AsyncTimeout$2.read(AsyncTimeout.java:238) ~[?:?] at okio.RealBufferedSource.request(RealBufferedSource.java:66) ~[?:?] 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
Follow, same issue here. Is there any workaround using some rules ?
Seem to have a similar issue. No disconnect message in openhab.log but myopenhab.org shows offline
Seem to have a similar issue. No disconnect message in openhab.log but myopenhab.org shows offline
same here. And btw, why is "base URL = http://localhost:6080" logged in my openhab.log with "[INFO] io.openhabcloud.internal.CloudClient" messages? Should this be "https://myopenhab.org"?
System: OH 3.2.0.M1 on docker.´
I got the same issue last week as described in the first post. Logs are showing disconnections and reconnections but in fact remote access from Android app is not possible.
It seems that there is still a bug that prevents an OH instance to reconnect to the cloud service after the cloud service had a problem. The workaround is to manually restart the OH connector or the entire OH instance.
Yes the restart is working but not obvious when you are in vacation, far from your local network.
This is still present (May 2022) with openHAB 3.2.0
It is exactly as @wborn said above 2 years ago https://github.com/openhab/openhab-cloud/issues/134#issuecomment-459117914
Two confirmed cases in community forum (https://community.openhab.org/t/openhab-cloud-connection-stops-working-does-not-try-to-reconnect/133608/34?u=ssalonen) tells that ping/pong is successfully being exchanged from client point of view. Still, myopenhab.org shows client being offline
Server side fixes recently: https://github.com/openhab/openhab-cloud/pull/381
Is the server side fix already online on myopenhab.org? And do we also need a fix on the client side? I am still having this issue with OH 3.1, no patches installed.
+1 to ondrej1024's question. @digitaldan, @ssalonen: would you be so kind to give us a quick update here?
I am having problems with disconnects too and I am hoping that they get resolved by this change.
Also: is there a way for us as users to see, which version/tag/commit is running on myopenhab.org? I looked around in the UI and in the HTML-source but did not find any version information.
I believe the servers have been updated but the problem remains I am afraid.
Unfortunately I also still ran into this issue multiple times this week. :worried:
This summer I was away from home for some weeks and never had an issue connecting remotely with the OpenHAB Android app to my OpenHAB instance at home. About a week ago the problems started and I got the connection errors every day. However now it's been working fine for at least 3 days. So maybe some updates have been done on the server.
Recent up-to-date summary of the issues from community user seanch https://community.openhab.org/t/openhab-cloud-connection-stops-working-does-not-try-to-reconnect/133608/54?u=ssalonen
As discussed in this thread, the client reconnects and receives responses from the server successfully (ping/pong). Even notifications work.
However, server consider client offline and access via myopenhab.org is not working.
Today I had the same problem happen again. Same as the last time:
Ping/pongs 100.0000% ok. I checked over 24 hours back in the log, and there was nothing wrong.
openhab app could not connect. Error message: “Your openHAB server is offline while the cloud instance is running.”
myopenhab.org 1 website says: " Your openHAB is not online. Please check if your installation is running or recheck the openHAB settings in your account."
Sending a notification did in fact work. It arrived as a notification on my phone instantly and could be display in the openhab app, however nothing else in the app worked as described above. I have a button in my house that has an associated rule that executes this openhab script code: sendNotification(“secret@email.com”, “Test notification.”)
Per usual, clicking the “Save” in the OpenHAB cloud menu fixed it all immediately.
Any news here? My openHAB cloud connection went down yesterday several times. Now since 24 hrs it does not come up anymore. Nothing helped: not a restart of my openHAB machine (linux), not several restarts of openHAB, not an uninstall/reinstall of the binding, not dozens of restarts of the bundle via karaf. Internet connection of my openHAB machine is ok (pings to myopenhab.org shows 11.5 ms).
For me the connection works. There is occasional issues (needing manual action to recover), as described in this thread.
However, the iOS testflight app now does not seem to work, keeps on loading. Locally the app works flawlessly. This could be an regression with the app though since browser access via myopenhab works (EDIT: iOS issues were unrelated. Clean reinstall of app worked)
Started working for me again after I changed uuid and secret. Maybe I caused some trouble with these settings during my several attempts to restart the bundle. Sorry!
Can't we just check on every ping/pong if we are online in myopenhab and if we aren't kill the connection so the client reconnects? Not perfect but seems like a nice idea to prevent connections being stuck. So on every ping run the check and only respond if returns "online", otherwise not respond at all.
Connection to cloud failed yesterday (22.11.2017) and remote connection didn't work even binding claims that connection is open.
I stopped and started Cloud Connector Bundle manually 2017-11-23 17:13:XX and now remote connection works again.
All cloud related logs:
From Cloud events