Dashboard Error "Connection Lost"


I'm having a problem with the dashboard which is as follows, sometimes when the Google Chrome browser does refresh I get a "Connection Lost" error. The sensor data upload server is connected to the network and I am programming the node-red to access this data on a VM Ware Windows7 machine and I access the dashboard on a physical computer with Linux Deepin, I have already cleared the navigation history of Google Chrome both in VM Ware and Linux and continue with this error, because the server is always connected to send data.



Do you mean the dashboard is working, but when you hit Refresh in the browser you get Connection Lost? Does it connect again at some point?



the browser does refresh itself and normally never refreshed but was presenting the data normally, and suddenly the message Connection Lost appears in the upper right corner of the dashboard and then connects itself on the server, waiting to receive data to present



So you didn't refresh it, it just stopped working suddenly by itself?
You did not say whether it has since recovered.



When the browser refresh itself, the message appears and suddenly it connects itself and returns the data received from the sensors, the dasboard does not stop, but it does something like type disconnects and connects, the message appears and then disappears. connected on the server, I do not know how to explain it better, I have the dashboard on.



Why does the browser refresh itself? That would not normally happen. I suspect it is the disconnection that is making you think it is refreshing.
If you view the editor rather than the dashboard does it do the same thing?
On the failing machine, In a terminal run the ping command with the ip address of the node-red server and leave it running. Does it show a problem when the browser disconnects?
How often does it happen?

If you connect to the server from another PC does it show the same problem?



Well the indicator only gets triggered when the websocket loses it's connection - so it must be getting disconnected somehow.
(It does then try to reconnect)



I hope there is a solution to this issue. I though it pretty neat that I could use the dashboard on a cellphone but the connection drops are a problem is trying to do live monitoring, drops eventually even if the browser in on localhost with node-red.

OTOH connections to the editor never seem to drop even for remote hosts.

I've some running on PiZero-W which seem to have intermittent Wi-Fi issues. I detect the loss of connection on the PiZero-W and node red triggers a reboot. The editor on the remote host shows "connection lost" while rebooting but automatically recovers when reboot completes. These have been running since since July so they are not the most recent versions of node-red but they do everything they need to do -- "if it ain't broke don't fix it"

The issue may depend on how much data is being sent across the websocket. These PiZero-W have dashboard UI that updates a couple os switch states ever 30-90 seconds and I've never seen the "connection lost" lost in this window unless its rebooting, but then I'm not looking at it very often.

On my AI systems trying to use the dashboard to view images updated a few times per second gets "connection lost" or a browser hang after a relative short time, so for now I've given up on the idea of using it as a "live" monitor.

I can see now this will be a difficult nut to crack.



Yes - until we can recreate it in some defined manner it will be hard to fix as I just haven't seen it (other than could be explained by bad/intermittent network issues). If there is some loading component affecting this then maybe when the garbage collector kicks in it causes issues as the main thread goes slow ?



When I log on to the dashboard the problem remains, when I ping the server's ip from the machine that accesses the dashboard, the time is never right as shown in the figure.

another information I can is that the ip's I have is:

ip of the machine in VM Ware with Windows 7 where the installed red node is, the machine where the access to the dashboard is a real pc with ip and the equipment that sends the data has ip and the ping don't show when exists the problem.



That is happening with me, this is the problem i have



@smalhao now I am confused. You initially said that the problem was with the dashboard sometimes showing not connected. Now you say that the problem is with the editor showing not connected when the server reboots and then recovering (which is exactly what should happen). Please try and explain very carefully exactly what problem you are having. I know the language difference is a problem but please try and explain clearly.



The problem is this as i show in image

I do not know why this happens because I have the equipment where you are sending the data always connected, in this case it is a CompactRIO, I have an application on my Smartphone that receives the data and never disconnects (receives the data well).
I tried to be the most explicit



Is the app running on the phone showing the same dashboard or is that an app connected directly to the data source? If it is direct to the data source then the fact that you can connect to the data source is irrelevant, the connection lost means that the browser cannot connect to the node red server.
You didn't say whether if you run a browser on another PC does it show the same problem (and is it at the same time?).

Does the node-red log show anything? It might be a good idea to post the log here, starting from the welcome message, up to the point where the connection stops working from the browser.



The app does not show the dasboard, it is a specific application, when I access the dashboard on another PC it shows the same problem, the log node-red does not show any problem, but I am thinking of a possibility that is the following, the browser does auto refresh, there will be some option in the browser settings to turn off the auto refresh of web pages in this case the dashboard?



I don't think that browsers auto-refresh.
If you manually refresh while the dashboard is working correctly does it show not connected for a while?
Please post the log anyway, it may tell us something.



when i run the Node-Red the log (i think is as you refers) but if the log not this, i appreciate tell me the command to run im cmd prompt

I remember that I ran the node red on a VMware virtual machine Windows7



Yes, that is the right log. It looks ok. So nothing else appears there when you get connection lost?
You didn't say whether you see Connection Lost if you do a manual browser refresh while the dashboard is connected ok.



I do not do manual refresh, the browser does it automatically, and when Connection Lost appears, it will look like the image I showed earlier and it will not take a second to appear again the values ​​that are being sent from the sensors.



The question is if you do a manual refresh while it is working ok do you see the same problem?