I’m having difficulty launching VNC from the Sunstone web UI. When I attempt to launch VNC, the following error is displayed: VNC noVNC ready: native WebSockets, canvas rendering.
Here is an overview of my configuration:
OpenNebula version used: 5.4.1
Public DNS resolves mydomain.biz to my assigned public IP
My assigned public IP —> Static NAT —> 192.168.100.12
Nginx is runnig on server 192.168.100.12
OpenNebula is running on server 192.168.100.10
Here is the relevant snippet from my nginx conf file
From the Sunstone web UI → Settings tab I set the VNC_WSS attribute to yes.
On server 192.168.100.10 I opened port 29876/tcp
Results:
All other Sunstone web UI functinality works as expected when accessing using https://one.mydomain.biz.
VNC will not work with the above configuration
VNC will work however if I set . vnc_proxy_support_wss: no in the sunstone-server.conf file and access the Sunstone web UI using http://192.168.100.10:9869
It is generally no error, but just message. So it stuck on canvas rendering. When it is working without wss and not working with wss, them there is probably problem with certificate.
So you want have nginx on dedicated 192.168.100.12 server, right? On that server you setup proxy_pass to opennebula. But when you open VNC, it try to connect to 192.168.100.12:29876, whci is not running on that server but on nebula one (192.168.100.10).
If you need dedicated setup, I can recommend you move novnc websocket service to nginx server 192.168.100.12 and leave remaining opennebula services on 192.168.100.10.
Good catch . . . After updating the server block as shown below and opening
up port 29876 in firewalld it ‘kind of’ works now.
With the Edge browser it appears to work consistently no problem. With
Chrome the VNC window opens but most of the time it disconnects after a few
seconds and displays: VNC Server disconnected (code: 1006).
To recap . . . My configuration has an nginx ssl proxy redirect running on a different host from the opennebula-sunstone host. With this configuration the Sunstone web UI loaded with no issues. However I was unable to initiate a VNC session.
The ultimate solution was to add a separate ssl proxy redirect for VNC connections in my nginx conf file and to open port 29876 on the nginx host. This solution assumes use of a cert from a commercial certificate authority (CA) although it does also work with a self-signed cert. The relevant configurations are shown below.
In final testing I ran into a problem opening the Sunstone web UI using Chrome. Intermittently when initiating a VNC session, a VNC Server disconnected (code: 1006) response would be displayed. In looking at the Chrome console I learned that I was not allowing enough time for a previously opened VNC session to completely disconnect. In other words, this message would be displayed if I closed one VNC session and immediately opened another VNC session. With that in mind I ended up having no problems opening a VNC session as long as I allowed at least a few seconds following the closing of a previous opened VNC session.
Thanks
Here is the relevant snippet from my nginx conf file