Page 1 of 2

Updated and now browser shows 'Connection Closed'

Posted: Sat 23 Nov 2019 5:37 pm
by TonyG
Hello all. It's been a long time since I had to post here. My motto has always been if it ain't broke leave it alone! Having said that I realised I was now running a very old version and so have updated to the latest version of MX. Looking back through the update posts I saw notice of a few major changes and the suggestion that all files in the distribution package be updated. (something to do with FTP and dlls I think) so this is what I've done.
Every thing seems to be OK, even my web page is being updated correctly BUT when I view with a web browser the 'Gauges' tab is showing all the gauges at null or zero and when I click on the 'Now' tab the web browser instantly pops up a 'Connection Closed' notification and all the fields are empty.
I repeat - all else seems OK and all the other tabs are displaying correctly.
Can anyone cleverer than me save me a few hours and point me in the right direction to fix these two issues. Thanks!

Re: Updated and now browser shows 'Connection Closed'

Posted: Sun 24 Nov 2019 5:01 pm
by mcrossley
Clear your browser cache, and which browser are you using, the release 3056 main dashboard page does not work with IE.

Re: Updated and now browser shows 'Connection Closed'

Posted: Mon 25 Nov 2019 7:14 am
by TonyG
Thanks Mark. I'm using current version of Firefox and Opera. Have cleared the cache. Same result using either.

Re: Updated and now browser shows 'Connection Closed'

Posted: Mon 25 Nov 2019 9:42 pm
by mcrossley
Edit: forget that, you are talking about your web pages - my error :bash:

Re: Updated and now browser shows 'Connection Closed'

Posted: Wed 27 Nov 2019 9:15 pm
by TonyG
No - you were right first time. :D I didn't really give enough information. I'm running my Pi headless and access the Dashboard over Ethernet and a web browser on my PC. It's there that the Now and Gauges tabs report 'Connection closed' The other tabs show data and work correctly and my website weather page is being updated correctly.

Re: Updated and now browser shows 'Connection Closed'

Posted: Wed 27 Nov 2019 10:52 pm
by mcrossley
Odd, as all the pages that update use the same web sockets mechanism.

Can you launch the Firefox Network tool ( Ctrl-Shift-E ) and see if you are getting any errors, the data should be coming on a connection labelled "ws"

I just tried Firefox on my install and the gauges are working OK.

Re: Updated and now browser shows 'Connection Closed'

Posted: Wed 27 Nov 2019 11:11 pm
by mcrossley
Unfortunately Firefox does not show the actual web socket messages - if you do the same in Chrome, that will show all the WS messages as they are received.

Re: Updated and now browser shows 'Connection Closed'

Posted: Thu 28 Nov 2019 5:45 pm
by TonyG
Hi Mark, I appreciate your help.

I don't have Chrome but Opera seems to supply the info needed. I can't be 100% sure as this is now above and beyond my competence level! :-)

Pictures below show Network and Console responses from the Now tab.

Re: Updated and now browser shows 'Connection Closed'

Posted: Thu 28 Nov 2019 9:25 pm
by water01
I assume you started Cumulus as root using "sudo mono CumulusMX.exe", because the 200 code means "Such a response means the remote resource located at the URL doesn't listen or at least can't respond to a websocket request."., which would happen if Cumulus could not open the listening port because it was started incorrectly.

Re: Updated and now browser shows 'Connection Closed'

Posted: Thu 28 Nov 2019 11:42 pm
by TonyG
Thanks David. Yes, Cumulus is started as root - sudo mono etc. Also would not all pages would report the same if Cumulus was not started correctly? As it is it's just Now and Gauges that show this behaviour.

Re: Updated and now browser shows 'Connection Closed'

Posted: Fri 29 Nov 2019 5:06 pm
by mcrossley
Very strange, and really hard to debug via a forum! Code 200 normally means success for HTML connection, but the web socket connection should return an error 101 code which means it is switching protocols to WebSockets.

What is also of interest is that the JavaScript on those pages, and the actual WebSocket code in CMX has not changed in quite a long time, and it is working for other people (me included) which points to some change in your environment.

Is there any chance of another copy of CMX running in background?

Re: Updated and now browser shows 'Connection Closed'

Posted: Fri 29 Nov 2019 5:41 pm
by HansR
I notice you have a version 3.18 for raspbian. That is not really current while the hardware really can handle more.
Wouldn't it be an idea to upgrade the OS?

Re: Updated and now browser shows 'Connection Closed'

Posted: Sat 30 Nov 2019 11:24 am
by TonyG
Thanks everyone.

Mark, there is only one instance of CMX running. I do run it in a detached screen but have always done so.

Hans, I did try to use the latest version of Raspbian (separate SD card) and although that was fine on my ageing Pi - the then needed version of Mono would not install. I think I'll just replace all the CMX files on the pi again, just in case I missed something, and see what happens.

Re: Updated and now browser shows 'Connection Closed'

Posted: Sat 30 Nov 2019 1:54 pm
by grpanos
hello
i have the same error after i update from version 3.0.0 build 3043
with that old version everything work great
but with update
the section now say connection closed
and the section Gauses not work at all
i use chrome and firefox last versions
it run at win10 pro
i install again the old version and i try update it again with versions newer that i have and i take the same erros
Sorry about my english but i hope you understand what i mean

Re: Updated and now browser shows 'Connection Closed'

Posted: Wed 04 Dec 2019 9:26 pm
by mcrossley
I worked through this with another user, it turned out to be just a stale cache issue. Clear the browser cache and it everything should work OK.