Web Socket Error on AmazonEchoControl binding every 65 seconds

Uninstalled the old binding, put the new fix binding in, cleared cache and rebooted. Same issue

mine has been up 42 minutes and no more websocket error which i had every minute in the log.
cleaned tmp folder also?

Certainly did!

sudo /etc/init.d/openhab2 stop
sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*
sudo /etc/init.d/openhab2 start

I see, the only things i did to fix this websocket error.

I removed the binding through Paper UI.
I’m running openhabian 2.5 headless so i just VNC into my pi3 b+ and manually cleaned the folder tmp and cache and dropped the jar in the addon folder and starting and stopping openhab in the terminal.

Fair enough, im using 2.4.0 but I doubt its different!

I’m running the latest fix version from today - 2.5.6-fix-leaks-fix-connection.jar - provided above. I cleaned my cache, restarted openHAB and my system several times and I am still seeing some sort of Web Socket Error, though it is not every 65 seconds but much less frequent:

2020-06-15 19:07:03.547 [WARN ] [trol.internal.handler.AccountHandler] - handling of websockets fails                                                                                                                                   │
20│org.openhab.binding.amazonechocontrol.internal.HttpException: GET url 'https://alexa.amazon.com/api/activities?startTime=1592266023415&size=10&offset=1' failed: Bad Request                                                            │
20│        at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:644) ~[bundleFile:?]                                                                                                                   │
20│        at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:499) ~[bundleFile:?]                                                                                                    │
20│        at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:494) ~[bundleFile:?]                                                                                                    │
20│        at org.openhab.binding.amazonechocontrol.internal.Connection.getActivities(Connection.java:938) ~[bundleFile:?]                                                                                                                 │
20│        at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handlePushActivity(AccountHandler.java:773) ~[bundleFile:?]                                                                                            │
20│        at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handleWebsocketCommand(AccountHandler.java:718) ~[bundleFile:?]                                                                                        │
20│        at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.webSocketCommandReceived(AccountHandler.java:706) [bundleFile:?]                                                                                       │
20│        at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$AmazonEchoControlWebSocket.onWebSocketBinary(WebSocketConnection.java:417) [bundleFile:?]                                                                 │
20│        at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) ~[?:?]                                                                                                                                                          │
20│        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]                                                                                                                         │
20│        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]                                                                                                                                                              │
20│        at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.20.v20190813]                                                                                                │
20│        at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.20.v20190813]                                                                  │
20│        at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryMessage(JettyAnnotatedEventDriver.java:133) [bundleFile:9.4.20.v20190813]                                                                        │
20│        at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68) [bundleFile:9.4.20.v20190813]                                                                                    │
20│        at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) [bundleFile:9.4.20.v20190813]                                                                                       │
20│        at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryFrame(JettyAnnotatedEventDriver.java:125) [bundleFile:9.4.20.v20190813]                                                                          │
20│        at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:145) [bundleFile:9.4.20.v20190813]                                                                                      │
20│        at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:321) [bundleFile:9.4.20.v20190813]                                                                                                   │
20│        at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.20.v20190813]                                                                                            │
20│        at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226) [bundleFile:9.4.20.v20190813]                                                                                                                         │
20│        at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:262) [bundleFile:9.4.20.v20190813]                                                                                                                    │
20│        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:582) [bundleFile:9.4.20.v20190813]                                                                              │
20│        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441) [bundleFile:9.4.20.v20190813]                                                                             │
20│        at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813]                                                                             │
20│        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]                                                                                                    │
20│        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]                                                                                                                              │
20│        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [bundleFile:9.4.20.v20190813]                                                                                                    │
20│        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [bundleFile:9.4.20.v20190813]                                                                                                                      │
20│        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [bundleFile:9.4.20.v20190813]                                                                                                                     │
20│        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]                                                                                                                              │
00│        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]                                                                                                                           │55
  │        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]                                                                                                         │
  │        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]                                                                                                       │
  │        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]                                                                                                      │
  │        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]                                                                                                             │
  │        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [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_252]                                                                                

Additionally, none of my Alexa “Smart Home Devices” are working/I can’t turn the lights on/of in about half my of home, which is rather frustrating :disappointed:

Hopefully OH developers etc can repair whatever has occured with michi so we can get him onboard to help out - he’s the expert with this!

It would be super helpful if someone could link to where this new JAR file can be found…

Here is a link to the post above, by @J-N-K, where they posted the new jar file earlier today.

And here is a direct link to the jar file, provided in the aforementioned post. Note: this is for the Release Candidate version and not for the Preview/Beta (there is no support for the Alexa “Smart Home Devices” functionality that exists in the Beta version of the AmazonEchoControl binding).

1 Like

Thanks guys. That did the trick. Echo control is working and my logs aren’t exploding.

Quick overview / dumbed down version on how to resolve… alternately use: openhab-cli console rather than ssh’ing out of habit like I do :slight_smile: (password: habopen) Find bundle number for amazon binding, update it, list it again to confirm version updates ok, logout, restart OH (or reboot)

Thanks heaps for the fix!

3 Likes

Installed the fix yesterday and running smoothly since:

##    Memory = Free: 2.68GB (70%), Used: 1.17GB (30%), Total: 3.86GB
##      Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB

Thanks s lot for the fix!

… and I also do not use lastCommand.

Hi everybody, currently I have not really time for the binding. Anyway, I have debugged now what’s going on. For the moment I did not find any solution, the upgrade request for the WebSocket is failing with unknown reason. It will take a lot of time to find what’s going on here. Anyone is welcome to help here. It will be necessary to compare the WS upgrade request in the Alexa Web-App with the one of the binding to find out the difference.

4 Likes

Unfortunately - since the code of the „beta“ can‘t be found anywhere - I cannot provide versions for that. In fact IMO this whole issues shows why there should be no beta/RC besides the official line.

2 Likes

I really dont know what im talking about so this might be a silly question but is it the JAR file you need and then you can apply the same changes to that?

No. The jar is built from source code. You can only change that source code and built a new jar. Since the source code is not available (at least nowhere I know, the „standard“ place would be a GitHub repository).

To explain how that works in general:

There is a GitHub repository called openhab-addons, this contains the addons for the official distribution. If someone wants to contribute to the project (and everyone is encouraged to do so, even if it‘s a minor correction to the documentation like better wording!) he can „fork“ that repository (make an own copy on GitHub). He can then work on that copy (which is still available publicly) and raise a „pull request“ (PR) to the official repo. GitHub then shows only the differences between the official and the modified versions. The „maintainers“ and everyone else (for example the original contributor, usually called the „codeowner“) can look at these changes and make suggestions for improvements („review“). After everything looks fine, the maintainers can include the code in the official repo (called „merge“).

If a pull request is there, someone else can probably take over if the original author gets lost. If not, the whole work has to be redone. Only binaries do not suffice.

4 Likes

@michi if Jan is willing to apply the changes to the beta - would you be able to share the source code?

Sounds very good, thx so much for spending so much time to this :).

But I have a little problem, when I trie to get the ID of my binding over bundle:list | grep -i amazon I dont get anything…the amazon binding is not available in the list…but the binding is still running… what could be the problem here? thx a lot

Important!!! Case Sensitive!!! Look for grep Amazon