Hello everyone, seems to be lots of info on this topic, but we are unable to use VNC when going through an Apache proxy. VNC works as expected if accessed directly from OpenNebula/Sunstone, and we are able to access and perform all other functions through the proxy, but when accessing VNC through proxy we get the " VNC Server disconnected (code: 1006)" so I assume it is related to websockets/ws_tunnel? Here are the details:
Ubuntu 16.04.3
OpenNebula 5.4 on single host (IP 192.168.1.71)
Apache 2.4.18 with wstunnel enabled (IP 192.168.1.90)
No firewalls between OpenNebula host and Apache host
ss -ntap |grep 29876
LISTEN 0 100 *:29876 :
SSL not used
sunstone-server.conf
:vnc_proxy_support_wss: no
Pretty sure this is where the issue is… just do not know how to resolve
apache config:
ProxyRequests off
RewriteEngine on
ProxyPreserveHost on
ProxyPass / http://192.168.1.71:9869/
ProxyPass / ws://192.168.1.71:9869/
firefox console:
Firefox can’t establish a connection to the server at ws://192.168.1.90:29876/?token=blahblahblah - shouldn’t firefox try to connect to .71?
I am open to using nginx, and have tried briefly with basically the same result. I’m sure it is a ‘ws’ directive issue, just not sure what.
I was able to resolve this using traefik as the proxy and configuring an additional entrypoing, frontend, and backend for port 29876. this proxied the traffic from the client machine to sunstone when it tried to access port 29876 on the proxy.