[Solved] Myopenhab (I think) not behaving

I have set up a configuration to allow Alexa to be able to toggle OH managed devices.
When it was initially set up to all worked fine for about 24 hours but now when I try to change stat of devices via Alexa I’m getting “Waiting for OpenHab…” then a delay of 5+ seconds and either “device unresponsive” or occasionally it works. When first set up it was almost instantaneous.

The recent OH logs have this in them:

2018-11-10 20:34:52.348 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'MQTT.items'
2018-11-10 20:43:45.745 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'MQTT.items'
2018-11-11 01:06:05.662 [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) [200:org.openhab.io.openhabcloud:2.3.0]
        at io.socket.engineio.client.transports.WebSocket.access$500(WebSocket.java:28) [200:org.openhab.io.openhabcloud:2.3.0]
        at io.socket.engineio.client.transports.WebSocket$2$5.run(WebSocket.java:150) [200:org.openhab.io.openhabcloud:2.3.0]
        at io.socket.thread.EventThread$2.run(EventThread.java:80) [200:org.openhab.io.openhabcloud:2.3.0]
        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.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:?]
        at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:?]
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:?]
        at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940) ~[?:?]
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) ~[?:?]
        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
2018-11-11 01:06:05.762 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 8e987094-132a-4c4f-9f24-0cf0f7b182ff, base URL = http://localhost:8080)
2018-11-11 08:39:24.429 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 8e987094-132a-4c4f-9f24-0cf0f7b182ff, base URL = http://localhost:8080)
2018-11-11 23:09:56.912 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'MQTT.items'
2018-11-11 23:12:54.923 [INFO ] [io.openhabcloud.internal.CloudClient] - Shutting down openHAB Cloud service connection
2018-11-11 23:12:54.942 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 8e987094-132a-4c4f-9f24-0cf0f7b182ff, base URL = http://localhost:8080)
2018-11-11 23:12:55.536 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 8e987094-132a-4c4f-9f24-0cf0f7b182ff, base URL = http://localhost:8080)

Also worth noting that I’m having difficulty accessing the OH console from https://home.myopenhab.org/start/index
timing out etc.
any time I refresh https://home.myopenhab.org in the browser it shows “online”

My internet connection is good. 40Mb/s down & 10Mb/s up. pinging myopenhab.org shows 30-34ms time.

Questions

  1. Is there a way to turn logging on on myopenhab.org?
  2. I’m not seeing any upnp type records on my router for OH. Should I be? Is there anything I should be configuring in my router?
  3. Any other diagnostic suggestions?

A restart of OH service on my RPi sorted it for now - but still don’t understand why…

[EDIT] Nope - back to either unresponsive or super slow (like 30 seconds for switch to toggle)

I’v turned OH logging up to DEBUG. What I’ve learned is that if the solution is being unresponsive then I never see this :slight_smile:

2018-11-12 15:20:26.013 [DEBUG] [io.socket.engineio.client.Socket    ] - socket received: type 'message', data '2["request",{"id":5874157,"method":"POST","headers":{"host":"myopenhab.org","content-length":"3","content-type":"text/plain","user-agent":"openhab-cloud/0.0.1"},"path":"/rest/items/Sonoff02_Test_Light","query":{},"body":"OFF"}]'

Nor do I see the several hundreds (maybe 1000’s) of follow up log messages associated with the request from Alexa. So it seems to me that the problem is upstream of my OH installation. So my BB router, Internet, myopenhab.org

Any guidance?

Same problem with my installation since yesterday: devices published to Alexa via myopenhab.org are offline in Alexa device list, when trying to access openHAB’s dashboard I get " 504 Gateway Time-out".
Openhab.log

2018-11-11 03:05:37.894 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: {}
2018-11-11 03:05:37.908 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = deleted, base URL = http://localhost:8080)

Similar problem was e.g. reported in November 2017, see Openhab 2 losing cloud connection.

@digitaldan and @MARZIMA could you take a look on that when you have time?

Regards,
Andy

I think that they are already working on it

All is fine again :slight_smile:

no - it’s not.

see here [Solved] Is home.myopenhab.org down?

Ralph