no VNC - LXC connection Issues

VVitness

New Member
Feb 6, 2023
1
0
1
Hello everyone. I'm trying to connect via a websocket on LXC using the noVNC library, but the error "failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED" is constantly returned. I can already connect to QEMU in the same way by calling the /vncproxy command and then connecting using the vncwebsocket method. However, when trying to connect to LXC, the above error constantly occurs.

I can't figure out what exactly I'm doing wrong.

1. send request to https://[host_ip]:8006/api2/json/nodes/[node_name]/[lxc/qemu]/[vm_id]/vncproxy (everything is fine here, in response I get a port and a ticket)

2. I try to connect via websocket wss://[host_ip]:[received port]/api2/json/nodes/[node_name]/[lxc/qemu]/[vm_id]/vncwebsocket?port=[received port]&vncticket=[ ticket]` - and here I constantly get error 1005. Although, as I noticed on the host side, it shows how the connection itself didn’t exist and the socket was closed by timeout
 
Hi,
in step 2, you try to connect via websocket using this URL:
wss://[host_ip]:[received port]/api2/json/nodes/[node_name]/[lxc/qemu]/[vm_id]/vncwebsocket?port=[received port]&vncticket=[ ticket]`
Can you try wss://[host_ip]:8006/... instead? I think the port received in step 1 is only relevant for the port query string parameter, not for the websocket connection itself.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!