Looking for some help with an issue I've been struggling with:
I have a new installation of Proxmox 8.0.4 on hardware located behind a pfSense firewall. The pfSense firewall has HAProxy installed on it in order to provide SSL certificates to all LAN servers and to redirect certain DNS names to certain ports (removing the need to remember different ports and IPs for every service). The HAProxy setup is working great, and I can access the Proxmox website and GUI just fine (and other servers). What doesn't work well is trying to bring up a console shell on a Proxmox node, VM, or Container.
If I connect to Proxmox using the DNS name with no port, essentially redirecting port 443 to 8006 through HAProxy, when I click on the _Shell button, and start up noVNC, the console comes up just fine. But it spontaneously disconnects anywhere from 25-60 seconds later. Same with xterm.js, where I get an disconnect with an error 1006.
If I connect to Proxmox using the DNS name and explictly use port 8006, I can bring up noVNC or xterm.js and it stays connected indefinitely. So the issue defintiely appears to be my HAProxy config.
When the disconnection happens, I get a log entry for HAProxy that looks like:
viceroy haproxy[33532]: 192.168.10.100:54911 [11/Nov/2023:02:54:18.340] https_shared-merged~ Dagobah_ipvANY/dagobah 0/0/3/3/30194 101 4329 - - cD-- 3/3/0/0/0 0/0 "GET /api2/json/nodes/dagobah/vncwebsocket?port=5900&vncticket=PVEVNCxxxxxx%3D%3D HTTP/1.1"
where viceroy is the pfsense/haproxy server and dagobah is the proxmox host, and the vncticket is a long keystring. So it appears that a websocket is trying to open using the vncwebsocket api after a period of time and doesn't transfer correctly.
This seems like a conflict between HAproxy and Proxmox with websockets, but all the responses say that HAProxy should handle websockets just fine. I've tried a number of different configs I've found in the these forums to get that websocket to work with no luck. I've attached my haproxy.cfg file to see if there's something I'm missing. Any guidance or ideas would be helpful.
Regards,
Jason
I have a new installation of Proxmox 8.0.4 on hardware located behind a pfSense firewall. The pfSense firewall has HAProxy installed on it in order to provide SSL certificates to all LAN servers and to redirect certain DNS names to certain ports (removing the need to remember different ports and IPs for every service). The HAProxy setup is working great, and I can access the Proxmox website and GUI just fine (and other servers). What doesn't work well is trying to bring up a console shell on a Proxmox node, VM, or Container.
If I connect to Proxmox using the DNS name with no port, essentially redirecting port 443 to 8006 through HAProxy, when I click on the _Shell button, and start up noVNC, the console comes up just fine. But it spontaneously disconnects anywhere from 25-60 seconds later. Same with xterm.js, where I get an disconnect with an error 1006.
If I connect to Proxmox using the DNS name and explictly use port 8006, I can bring up noVNC or xterm.js and it stays connected indefinitely. So the issue defintiely appears to be my HAProxy config.
When the disconnection happens, I get a log entry for HAProxy that looks like:
viceroy haproxy[33532]: 192.168.10.100:54911 [11/Nov/2023:02:54:18.340] https_shared-merged~ Dagobah_ipvANY/dagobah 0/0/3/3/30194 101 4329 - - cD-- 3/3/0/0/0 0/0 "GET /api2/json/nodes/dagobah/vncwebsocket?port=5900&vncticket=PVEVNCxxxxxx%3D%3D HTTP/1.1"
where viceroy is the pfsense/haproxy server and dagobah is the proxmox host, and the vncticket is a long keystring. So it appears that a websocket is trying to open using the vncwebsocket api after a period of time and doesn't transfer correctly.
This seems like a conflict between HAproxy and Proxmox with websockets, but all the responses say that HAProxy should handle websockets just fine. I've tried a number of different configs I've found in the these forums to get that websocket to work with no luck. I've attached my haproxy.cfg file to see if there's something I'm missing. Any guidance or ideas would be helpful.
Regards,
Jason