noVNC disconnects after about 44 seconds

75 views
Skip to first unread message

Richard Mixon

unread,
Mar 28, 2024, 3:20:24 PMMar 28
to noVNC
Our noVNC 1.4.0 configuration (connecting to TigerVNC  is working except that it disconnects after about 45 seconds. We are able to reconnect by just pressing the Connect button but then it disconnects again in 45 seconds.  Here's the log.
  • n2kowner@RichU1:/var/log/n2k$ sudo tail -n 0 -f /var/log/syslog
    Mar 28 19:08:37 RichU1 novnc_proxy[1321329]: handler exception: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1007)
    Mar 28 19:08:37 RichU1 1 2024-03-28T19:08:37Z RichU1 websockify 1321329 - - handler exception: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1007)
    Mar 28 19:08:37 RichU1 novnc_proxy[1321334]: 192.168.0.187 - - [28/Mar/2024 19:08:37] 192.168.0.187: SSL/TLS (wss://) WebSocket connection
    Mar 28 19:08:37 RichU1 novnc_proxy[1321334]: 192.168.0.187 - - [28/Mar/2024 19:08:37] 192.168.0.187: Path: '/websockify'
    Mar 28 19:08:37 RichU1 novnc_proxy[1321334]: 192.168.0.187 - - [28/Mar/2024 19:08:37] connecting to: localhost:5901
    Mar 28 19:08:37 RichU1 1 2024-03-28T19:08:37Z RichU1 websockify 1321334 - - 192.168.0.187 - - [28/Mar/2024 19:08:37] 192.168.0.187: SSL/TLS (wss://) WebSocket connection
    Mar 28 19:08:37 RichU1 1 2024-03-28T19:08:37Z RichU1 websockify 1321334 - - 192.168.0.187 - - [28/Mar/2024 19:08:37] 192.168.0.187: Path: '/websockify'
    Mar 28 19:08:37 RichU1 1 2024-03-28T19:08:37Z RichU1 websockify 1321334 - - 192.168.0.187 - - [28/Mar/2024 19:08:37] connecting to: localhost:5901
    Mar 28 19:09:21 RichU1 novnc_proxy[1317035]: Terminating WebSockets proxy (1317047)
    Mar 28 19:09:21 RichU1 novnc_proxy[1317047]: In exit
    Mar 28 19:09:21 RichU1 novnc_proxy[1317047]: Terminating child 1321334
    Mar 28 19:09:21 RichU1 1 2024-03-28T19:09:21Z RichU1 websockify 1317047 - - In exit
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: Process Process-2:
    Mar 28 19:09:21 RichU1 1 2024-03-28T19:09:21Z RichU1 websockify 1317047 - - Terminating child 1321334
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: Traceback (most recent call last):
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.run()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self._target(*self._args, **self._kwargs)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 662, in top_new_client
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: client = self.do_handshake(startsock, address)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 590, in do_handshake
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.RequestHandlerClass(retsock, address, self)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 87, in __init__
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: super().__init__(req, addr, server)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/http/server.py", line 668, in __init__
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: super().__init__(*args, **kwargs)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/socketserver.py", line 747, in __init__
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.handle()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 297, in handle
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: super().handle()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/http/server.py", line 433, in handle
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.handle_one_request()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websocketserver.py", line 40, in handle_one_request
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: super().handle_one_request()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3.10/http/server.py", line 421, in handle_one_request
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: method()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websocketserver.py", line 50, in _websocket_do_GET
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.handle_upgrade()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 203, in handle_upgrade
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: super().handle_upgrade()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websocketserver.py", line 77, in handle_upgrade
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.handle_websocket()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 241, in handle_websocket
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.new_websocket_client()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websocketproxy.py", line 123, in new_websocket_client
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.do_proxy(tsock)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websocketproxy.py", line 198, in do_proxy
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: ins, outs, excepts = select.select(rlist, wlist, [], 1)
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 654, in do_SIGTERM
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: self.terminate()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: File "/usr/lib/python3/dist-packages/websockify/websockifyserver.py", line 627, in terminate
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: raise self.Terminate()
    Mar 28 19:09:21 RichU1 novnc_proxy[1321334]: websockify.websockifyserver.WebSockifyServer.Terminate
    Mar 28 19:09:21 RichU1 grep[1325256]: <display mode="html"/>
    Mar 28 19:09:21 RichU1 novnc_proxy[1325259]: Using installed websockify at /usr/bin/websockify
    Mar 28 19:09:21 RichU1 novnc_proxy[1325259]: Starting webserver and WebSockets proxy on port 443
    Mar 28 19:09:22 RichU1 novnc_proxy[1325290]: WebSocket server settings:
    Mar 28 19:09:22 RichU1 1 2024-03-28T19:09:22Z RichU1 websockify 1325290 - - WebSocket server settings:
    Mar 28 19:09:22 RichU1 1 2024-03-28T19:09:22Z RichU1 websockify 1325290 - - - Listen on :443
    Mar 28 19:09:22 RichU1 novnc_proxy[1325290]: - Listen on :443
    Mar 28 19:09:22 RichU1 novnc_proxy[1325290]: - Web server. Web root: /home/n2kowner/noVNC-1.4.0
    Mar 28 19:09:22 RichU1 1 2024-03-28T19:09:22Z RichU1 websockify 1325290 - - - Web server. Web root: /home/n2kowner/noVNC-1.4.0
    Mar 28 19:09:22 RichU1 novnc_proxy[1325290]: - SSL/TLS support
    Mar 28 19:09:22 RichU1 1 2024-03-28T19:09:22Z RichU1 websockify 1325290 - - - SSL/TLS support
    Mar 28 19:09:22 RichU1 novnc_proxy[1325290]: - proxying from :443 to localhost:5901
    Mar 28 19:09:22 RichU1 1 2024-03-28T19:09:22Z RichU1 websockify 1325290 - - - proxying from :443 to localhost:5901
    Mar 28 19:09:22 RichU1 novnc_proxy[1325259]: Navigate to this URL:
    Mar 28 19:09:22 RichU1 novnc_proxy[1325259]: http://RichU1:443/vnc.html?host=RichU1&port=443
    Mar 28 19:09:22 RichU1 novnc_proxy[1325259]: Press Ctrl-C to exit
    ^C
    n2kowner@RichU1:/var/log/n2k$

The stack trace does not make a lot of sense to me - I'm hoping someone can point us to the issue.

Changes we have made:
  1. Set "autoconnect = true" in app/ui.js
  2. Set this._rfbCredentials.username and this._rfbCredentials.password in core/rfb.js
  3. We are running with https enabled.
Thank you much - Richard

Richard Mixon

unread,
Mar 29, 2024, 1:06:36 PMMar 29
to noVNC
Any ideas from anybody on how to fix this?

Richard Mixon

unread,
Apr 2, 2024, 10:40:53 AMApr 2
to noVNC
Am I asking for help in the wrong away?

I have traced the stack trace through the code and it seems it only shows a generic facility for terminating the running server. It does NOT show anything that might suggest a reason for the error in the first place.

Thank you much - Richard

linma

unread,
Apr 8, 2024, 5:02:24 AMApr 8
to noVNC
From the logs it seems like something is restarting the service, but it's unclear why. However, the issue is on the server end, so the 3 changes listed for the client should be unrelated.

novnc_proxy doesn't run as a service out of box, so additional details there are useful. How is the service set up?

Richard Mixon

unread,
Apr 8, 2024, 4:37:29 PMApr 8
to noVNC
You are on the right track - it was service related. One of our team figured out that is was caused because our service unit file (/etc/systemd/system/noVNC.service) had "Type=notify" instead of "Type=simple".

It is working fine now.

Thank you for  the response.

Reply all
Reply to author
Forward
0 new messages