Page 1 of 1

Websocket Pending Problem

Posted: Mon 19 Feb 2024 6:14 pm
by jbxtr
Hi,
I'm a couple of months into my "journey" setting up a Davis Vantage Pro 2 with Cumulus MX and so far have been massively impressed by what the two can do. It's also increasingly clear to me that I've literally just scratched the surface of what Cumulus can do! But also how much work has clearly gone into getting Cumulus to do what it does, so a big thank you to all that have made it what it is 😊

I have a couple of questions (which may be linked so I’m including both below) that I'm hoping someone can hopefully help me resolve.
Websocket Pending
Every day (multiple times a day, though always at different times of the day) the standard Cumulus MX dashboard stops displaying data. The gauges, charts, today/yesterday screens still work but the dashboard and ‘Now’ pages show no values. Whenever the problem happens I can see in via browser developer tools that ‘websocket’ is pending and never loads (see attached screen shot).
I’ve searched this forum and can see some mention of a similar issue from a couple of years ago, but not what the cause / solution was to the problem. My problem happens on different devices, different browsers, and also after clearing the browser cache.

Latest Build Error
The second, possibly related (??), problem I have is that every day Cumulus MX logs an error “Failed to get the latest build version from GitHub - The operation was canceled.”. The only reason I wondered if the two were related is that I happened to notice both problems around the same time.

Any help would be massively appreciated.

Thanks, Justin

Cumulus MX Version: 3.28.3 b3280
Hardware: Raspberry Pi 3

Re: Websocket Pending Problem

Posted: Mon 19 Feb 2024 6:20 pm
by freddie
It sounds very much like a local network issue. Communication across the network between your web browser and your CumulusMX installation is needed for the websocket connection to work. Similarly, the issue with connecting to Github to check for new versions requires use of your local network to connect via the internet to Github to perform the check. Ass you appear to be able to connect when refreshing the web page for example, it suggests an intermittent issue.

Re: Websocket Pending Problem

Posted: Mon 19 Feb 2024 6:38 pm
by jbxtr
Thanks for the quick reply. I think you're right regarding the connection to Github as I've just checked and it looks like my firewall was set up by default to block outbound traffic to Github. I've now disabled the rule so hopefully that will fix the update check error.

Re the websocket issue, unfortunately it doesn't go away with refreshing the browser. The only "solution" is to wait an hour or two and then try again and it then typically works - normally for most of the day - before then failing to load again later in the day. All very odd.

Justin.

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 6:29 am
by HansR
jbxtr wrote: Mon 19 Feb 2024 6:38 pm Re the websocket issue, unfortunately it doesn't go away with refreshing the browser. The only "solution" is to wait an hour or two and then try again and it then typically works - normally for most of the day - before then failing to load again later in the day. All very odd.
Does the socket issue always happen at the same time or is it at random times?

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 9:42 am
by jbxtr
It appears to be completely random. There's an element of chance in that I don't always view the dashboard at exactly the same time every day. However, I typically look at "similar" times of the day and sometimes it's OK and other times there's the websocket issue. Whether I look again in half an hour, or a few hours, sometimes it's back up and running and other times the dashboard is still showing no data. As I say, all other pages are working 100% and updating as expected. Thanks

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 3:17 pm
by mcrossley
Are you leaving the Dashboard page open continuously as some sort of display, or just opening as needed (even if letting a browser tab "go to sleep" in background, then returning to that tab to reactivate it)?

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 5:10 pm
by jbxtr
There’s definitely no “display”. I do however usually leave a browser window open in safari on my iPhone which I use to view the dashboard. So that might be the “go to sleep” scenario you’re referring to.

In case it helps to know, if I find the dashboard isn’t responding on my phone and then boot up a PC (so no existing browser windows open) the PC will also have no data in the dashboard (and show the pending websocket in dev tools).

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 5:45 pm
by mcrossley
I run a couple of Cumulus installs on raspberry pi's and have never seen this problem in all the years I've been running them. That doesn't help you, but this is also the first report of this particular problem I have seen, which makes me inclined to think it is something in your environment causing it.

The web socket service is a listener that adds and removes connections as the requests come in. It uses an internal broadcast to send each update to all attached clients.

The connects and disconnects are logged in the MXdiags file if debug logging is enabled.

So please switch on debug logging, and note the time when you get a failed WS connection. Then look in the log file and see if MX is logging any sort of error, or even seeing the connection request coming in.

Re: Websocket Pending Problem

Posted: Tue 20 Feb 2024 7:31 pm
by jbxtr
OK, thanks. I'll do that and report back.

Re: Websocket Pending Problem

Posted: Tue 02 Apr 2024 7:48 pm
by jbxtr
FYI, I've monitored the problem over the last month and not had the issue once. I can only assume it was linked to leaving the webpage open in my browser. Thank you for the help

Re: Websocket Pending Problem

Posted: Tue 02 Apr 2024 10:33 pm
by mcrossley
:thumbsup: