Undefined Code: 1006

This happened to me also,
I installed Nginx-Proxy-Manager, and I tried to log in remotely. I had the same issue; The issue was corrected in my case by enabling Websockets Support, and that solved my problem; now I can connect remotely, no more code 1006.
This nailed it! Many Thanks!!!!!! :cool::):D:D
 
  • Like
Reactions: OD3UNICRON
Follow up: The only thing I have noticed now is that I am unable to upload new images from my computer to the proxmox server when I go via NPM https..... I have to go to proxmox via IP to do that. Any Ideas how to solve this?

There is no error message. It just doesnt start with the upload.Screenshot 2023-08-06 at 11.59.52.png
 
Last edited:
If you're having WebSockets issues while using Nginx Proxy Manager, try adding these to your location / in your custom configuration (or in the regular configuration if using regular nginx):

NGINX:
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_http_version 1.1;
    proxy_set_header Connection "upgrade";
 
This happened to me also,
I installed Nginx-Proxy-Manager, and I tried to log in remotely. I had the same issue; The issue was corrected in my case by enabling Websockets Support, and that solved my problem; now I can connect remotely, no more code 1006.
Thanks!!! after enabling Websockets it's working now! Greetings from Argentina
 
  • Like
Reactions: OD3UNICRON
failed waiting for client: timed out
TASK ERROR: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
I was having the exactly the same issue, and for me, the problem was that i was using a reverse proxy to have https access. i was using nginx running locally on another machine, once i turned back to accessing the server using the local ip address it worked again.
 
I fixed this on my mac by going into KeyChain Access --> Login keychain (Under default keychain) --> tab Certificates and then double click on the hostname of your proxmox box. Under Trust, select always trust.

If you on MacOS using Safari ( it is OK in Chrome 'cause Chrome uses its own certs container but Safari does use system one) — you need to add self-signed Proxmox (node) certificate to your KeyChain and put "Always trust" under the Trust section.

So I had to:
export self-signed cert of a proxmox node using Chrome into a .crt file,
then drag-n-drop it into KeyChain --> System,
then chose "Always trust" under the Trust section.

And I got it working! (console in web-interface for vm and ct)
 
  • Like
Reactions: Natmac21007
I'm getting the same code 1006, and I'm also using Nginx-Proxy-Manager. But I'm fairly new, so can you please tell me how to enable the websocket support.
I know this is very old sub and idk if it has been solved but, im using nginx via lxc and added the below to my /sites-available/ configs to enable websocket connections:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

my whole config for by backend servers:


server {
listen 443 ssl;
server_name <your-domain>.com;

ssl_certificate /etc/nginx/ssl/cloudflare_origin.pem;
ssl_certificate_key /etc/nginx/ssl/cloudflare_origin.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;

location / {
proxy_pass <internal-server-ip-addr>:<port> ; # Use HTTPS to connect to the backend
proxy_ssl_verify off; # Skip SSL verification for self-signed certs
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# Timeout settings for WebSocket
proxy_read_timeout 60s;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;



}
}

server {
listen 80;
server_name <your-domain>.com;

return 301 https://$host$request_uri; # Redirect HTTP to HTTPS