Page 1 of 2
'connection closed' message when opening the dashboard.
Posted: Sat 20 Jun 2015 2:37 pm
by TonyG
Hi again,
To recap. I've been running Cumulus MX dist 3025 on a headless raspberry Pi (Raspian 3.18.11) for a few weeks now with no real problems. The Pi has a fixed ip address.
However I've now noticed one little oddity and I'm not sure if it's an OS problem or Cumulus. It's this. After a few days uptime I go to load the Cumulus dashboard (latest Firefox browser on win 7) and get the message 'connection closed'. The only solution is to SSH back into the Pi, load up the screen I've left Cumulus running in and restart Cumulus. This all goes as expected and does not suggest that the Pi has crashed. All then seems well for a few more days. The strange thing is that my web pages carry on updating correctly regardless of the inability to load the dashboard - so Cumulus must still be doing it's stuff at some level.
Does anyone have any idea of where to start trouble shooting this please? Thanks.
Re: 'connection closed' message when opening the dashboard.
Posted: Sat 20 Jun 2015 3:32 pm
by steve
If you open the browser F12 console, you may be able to get better diagnostics. Do the get the same with another browser? Are any messages displayed by the MX command line? Anything relevant in the MXdiags file?
Re: 'connection closed' message when opening the dashboard.
Posted: Sun 21 Jun 2015 10:41 am
by TonyG
Thanks Steve. I've tried Opera with the same result. I can see nothing in the MXdiags file I but have attached it to this post in case it helps. Cumulus seems to be running up to the point I terminate it to restart. I've also attached the F12 console result when I can't access the dashboard. As no one else has jumped in with 'yes, I've noticed that too!' I guess it must be something specific to my set up.
Re: 'connection closed' message when opening the dashboard.
Posted: Sun 21 Jun 2015 1:22 pm
by steve
It's the web socket connection that's the problem - can you connect to pages that use ajax, e.g. the charts page?
I don't know why it can't connect; MX has been running for over two weeks since I last restarted it on my Pi, and it never fails to connect on the occasions that I look at the dashboard. If you do 'netstat -l' on the Pi, does it show that port 8002 is in LISTEN state?
Re: 'connection closed' message when opening the dashboard.
Posted: Sun 21 Jun 2015 3:52 pm
by TonyG
Ok. Thanks very much. I'll try your suggestions and post the results next time I can't access the dashboard.
Re: 'connection closed' message when opening the dashboard.
Posted: Sun 19 Jul 2015 10:55 pm
by TonyG
Finally - it has happened again! I went to the dashboard only to get 'connection closed'. So a quick update. Yes, the charts do load and Port 8002 seems to be in listen state. (see attached screen shots)
Re: 'connection closed' message when opening the dashboard.
Posted: Sun 19 Jul 2015 11:00 pm
by water01
have you tried just closing the message and then doing a browser refresh (F5)?
Re: 'connection closed' message when opening the dashboard.
Posted: Mon 20 Jul 2015 3:25 am
by BigOkie
water01 wrote:have you tried just closing the message and then doing a browser refresh (F5)?
I've found when that happens, just clear your browser cache.
For that matter, I open the MX dashboard ONLY under a Chrome incognito window. Never loads cache.
Re: 'connection closed' message when opening the dashboard.
Posted: Mon 20 Jul 2015 7:41 am
by steve
It's hard to suggest what the problem might be without further information from Firefox for the websocket connection. If Firefox cannot give this, you could use
Fiddler
Does MX show a connected and disconnected message at the time this happens?
Re: 'connection closed' message when opening the dashboard.
Posted: Tue 21 Jul 2015 1:07 pm
by TonyG
Thanks for the suggestions everyone. Nothing works for me other than closing and re-starting Cumulus. I'll see if I can can get more info via Fiddler next time it happens.
Re: 'connection closed' message when opening the dashboard.
Posted: Fri 21 Aug 2015 12:38 pm
by gluepack
Just to add that I have the Connection Closed message quite often in Firefox but it is usually after I haven't looked at the tab for a while and I just click ok and the dashboard is refreshed and there is no effect on the server side. The browser system hasn't gone to sleep. I came on this thread when I was looking to see if anyone had a similar problem and was going to ask whether it was a browser, client or server problem (I assumed it was a timeout somewhere). As there is no effect on the server, it isn't really a big deal for me.
Re: 'connection closed' message when opening the dashboard.
Posted: Sat 17 Oct 2015 9:32 am
by TonyG
Hi all. I still have this problem and it stops me from fully migrating to MX. I have tried all the preceding suggestions (thanks everyone!) but the only way to get the dashboard back each time it happens is to restart Cumulus on the Pi. (My PC has even been through the Windows 10 upgrade in the interval) I've attached a screen shot of the browser console in case it helps.
Re: 'connection closed' message when opening the dashboard.
Posted: Sat 17 Oct 2015 9:38 am
by steve
If netstat shows MX still listening on 8002, and there are no error messages on the command line or in the diags file, then I don't know where the problem is. Does this happen with other browsers?
I think you will need to run Wireshark or similar on the Pi, so that we can see the traffic, and whether the connect request from Firefox actually gets to the Pi.
Re: 'connection closed' message when opening the dashboard.
Posted: Wed 21 Oct 2015 2:30 pm
by TonyG
Thanks Steve. Yes, as before it's any browser even from an android tablet, and as before the port is shown as listening. I'll see if I can get my head around 'Wireshark' and provide more information. Anyway it's obviously specific to something I have or am doing as no one else is experiencing the same issue.
Re: 'connection closed' message when opening the dashboard.
Posted: Fri 23 Oct 2015 2:49 pm
by jank
Hi
to get a TCP Dump which can be read from Wireshark on windows, please do this
Install tcpdump on your Raspberrypi
sudo apt-get install tcpdump
once it is installed, use this command to start a TCP dump
sudo tcpdump -i eth0 -s0 -w /tmp/cumulus.pcap port 8998
Switch to your windows box with the Webbrowser and try to connect to the CumulusMX Dashboard
Once this is done and you see this error again you can switch back to your Raspberry Pi Session and hit CTRL+C to stop the dump.
you should see a result like this:
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
375 packets captured
375 packets received by filter
0 packets dropped by kernel
The dump file is located in /tmp/cumulus.pcap and can be read by Wireshark on Windows, or uploaded here for further investigation
I hope this helps
Jan