Closed amule0317 closed 1 year ago
It sounds like you have a firewall or something killing connections if they are idle.
What does the browser console on the client say?
We are seeing this error Server Disconnected (Code : 1006)
We need to see the details from the Javascript console. The browsers unfortunately don't tell us enough that we can present in the UI.
@CendioOssman Please find Javascript console details. Just masked IPs for security purpose. The code we use is https://github.com/novnc/noVNC/blob/master/vnc_lite.html. But, we have not pulled in latest changes of this file and its the same for many years now. Not sure if this error has any significance of vnc_lite.html version.
Thanks.
Not many more details there, but we can see that it wasn't initiated from noVNC at least. And since the browser didn't log anything extra, I would assume it was network initiated.
So unfortunately, it's not something we can really help you with. There is something on your network killing those connections. Likely a proxy or firewall. You'll need to figure out it is and get someone to adjust it to not kill these connections.
I am using novnc websockify library to connect vnc console. I am able to connect to the console, but console get disconnected after 30 min if it is left idle (i.e no input is provided to console)
While debugging the websockify, below is the analysis,
When do_proxy(websockify/websocketproxy.py) method is called
For 30 min it return ins, outs, excepts as empty list. 2023-09-16 07:07:03.816 3843 INFO websockify.websocketproxy [req-****] Value of ins is [] 2023-09-16 07:07:03.816 3843 INFO websockify.websocketproxy [req-****] Value of outs is []
After 30 min, we recieve below ins and outs 2023-09-16 07:07:04.631 3843 INFO websockify.websocketproxy [req-****] Value of ins is [<websockify.websockifyserver.CompatibleWebSocket object at 0x7fad0042a2e0>] 2023-09-16 07:07:04.631 3843 INFO websockify.websocketproxy [req-****] Value of outs is [] and then console get disconnected.
we analyzed that do_proxy method calls recv_frames(websockify/websockifyserver.py) method which internally call _recv_frames(websockify/websocket.py)
This calls self._recv()
Here after 30 min value of data is coming as None and it then returns false. and then it raise 1006 error.
Any idea, How the session is getting disconnected after 30 min.