i am trying to use the noVNC HTML5 Client to connect via noVNC to a vm running on my proxmox server.
I am using proxmoxer as client for the proxmox API.
first i log in to proxmox via the API to get the vnc tocket. After that, i call the vncwebsocket endpoint to open the websocket connection like described here.
Here is the code for this:
node, vm = 'pve-03', '497'
proxmox = ProxmoxAPI(PROXMOX_HOST, user=PROXMOX_USER, password=PROXMOX_PASSWORD, verify_ssl=False)
proxmox.login()
vnc_res = proxmox.nodes(node).qemu(vm).vncproxy().post(websocket="1")
vnc_ticket = quote_plus(vnc_res['ticket'])
ws_res = proxmox.nodes(node).qemu(vm).vncwebsocket().get(
vncticket=vnc_res['ticket'],
port=vnc_res['port']
)
Now i build the websocket url for the noVNC client and open it in my browser.
port = ws_res['port']
url = f'http://localhost/noVNC/vnc.html?autoconnect=1&encrypt=1&path=&host={PROXMOX_HOST}&port={port}&password={vnc_ticket}'
But the noVNC client shows: failed to connect to server.
Here is what i see in the network tab:

I searched a lot how to get it to work but with no resulsts. Does anyone have a solution for this?
Thanky in advance