[SOLVED] Amazonechocontrol is instable: Web Socket close 1006

Hi there,
My AmazonEchoControl is quite instable, and I wonder if somebody has an Idea how to fix that.
In the logs, there is a disconnect detected, about 3min after the disconnection happens -> so the binding is offline for about 3 min without noticing it. and it happens a lot.

I described my problem in detail in the github-issue https://github.com/openhab/openhab2-addons/issues/6199 but have not received feedback, so I try it here :slight_smile:

Can you guys confirm that I am the only one with the problem? Maybe check your logs too? :slight_smile:
I am talking about this log entry:

09-Oct-2019 21:32:34.652 [INFO ] [ing.amazonechocontrol.internal.WebSocketConnection] - Web Socket close 1006. Reason: Disconnected

And if I might be the only one, does somebody has an Idea what to try to fix that?
I have 7 echos in my house and run 2.5m3 on an ubuntu vmware server with openhabian.
Items and thing-file is in the github-issue.

Thanks!
PhiL

I’m running OH version 2.5M5 and see the same message sometimes. It has not been a problem, thus far, as everything works as expected. Since it is an INFO only log I just ignore it and hope nothing more becomes of it.:crossed_fingers:

If you do find the reason for this please let me know as I am curious as to why it disconnects. Thanks

I have a full blown error sequence in my logs. Typically, my phone company is resetting the internet connection during that time. - Confirmed, the router is showing IP renewal in the logs.

2019-12-15 03:41:32.657 [ERROR] [io.openhabcloud.internal.CloudClient] - Error connecting to the openHAB Cloud instance: {}
io.socket.engineio.client.EngineIOException: websocket error
        at io.socket.engineio.client.Transport.onError(Transport.java:63) [bundleFile:?]
        at io.socket.engineio.client.transports.WebSocket.access$400(WebSocket.java:24) [bundleFile:?]
        at io.socket.engineio.client.transports.WebSocket$1$5.run(WebSocket.java:107) [bundleFile:?]
        at io.socket.thread.EventThread$2.run(EventThread.java:80) [bundleFile:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:1.8.0_152]
        at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_152]
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:1.8.0_152]
        at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:1.8.0_152]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:1.8.0_152]
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940) ~[?:1.8.0_152]
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) ~[?:1.8.0_152]
        at okio.Okio$2.read(Okio.java:139) ~[?:?]
        at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) ~[?:?]
        at okio.RealBufferedSource.request(RealBufferedSource.java:67) ~[?:?]
        at okio.RealBufferedSource.require(RealBufferedSource.java:60) ~[?:?]
        at okio.RealBufferedSource.readByte(RealBufferedSource.java:73) ~[?:?]
        at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:113) ~[?:?]
        at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:97) ~[?:?]
        at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:262) ~[?:?]
        at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:201) ~[?:?]
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141) ~[?:?]
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
        ... 3 more
2019-12-15 03:41:32.701 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = a01c174f-ff1f-41f2-aab8-d947b654251c, base URL = http://localhost:8442)
2019-12-15 03:41:34.694 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = a01c174f-ff1f-41f2-aab8-d947b654251c, base URL = http://localhost:8442)
2019-12-15 03:43:49.123 [INFO ] [control.internal.WebSocketConnection] - Web Socket close 1006. Reason: Disconnected
2019-12-15 03:43:49.123 [INFO ] [control.internal.WebSocketConnection] - Web Socket error
org.eclipse.jetty.io.EofException: null
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:283) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.flush(SslConnection.java:910) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:422) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:277) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:381) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.FrameFlusher.flush(FrameFlusher.java:264) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.FrameFlusher.process(FrameFlusher.java:193) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:516) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.client.io.WebSocketClientConnection.outgoingFrame(WebSocketClientConnection.java:72) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.close(AbstractWebSocketConnection.java:184) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:458) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: java.io.IOException: Datenübergabe unterbrochen (broken pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[?:1.8.0_152]
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) ~[?:1.8.0_152]
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[?:1.8.0_152]
        at sun.nio.ch.IOUtil.write(IOUtil.java:51) ~[?:1.8.0_152]
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) ~[?:1.8.0_152]
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:261) ~[bundleFile:9.4.20.v20190813]
        ... 23 more

In the meantime, I don’t have this issue anymore. It stopped with 2.5m4. I didn’t check the logs though, but alexa is just always responsive.