PVE 8.2.4 , nginx 1.26.0, apache2 2.4.62
Here is my nginx conf:
- I create a CT with IP 10.0.0.103/24, and I install nginx for proxy
- Cp noVnc 1.4.0 to nginx path /mnt/dist/static/novnc
- Visit https://10.0.0.103/staic/novnc/vnc.html
- Post vncproxy Api and get port and ticket
- Get encodeURIComponent(ticket)
- try connect with url path api2/json/nodes/www/qemu/101/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D6B832%3A%3Aiu4lWyBt09qsy6p2ppHBjPjOUGbGb2Xnog%2BNg9v1tPk7bMcrkqR41P3RIMEZu2xGsEEzs%2F05v74sAbGZq%2BjpWtLTfl341%2BRIEJtu8FTEhH015MY2kPpi73rr7RBZRr4Fbpczc%2FrtgmdX%2BaoBk88%2BTLl%2By0i3x11BRcLPDoyBSyCJZGtHpwj6hdsNdwmoMUhqNgAaOhF76KkBXyGY5msm7%2Bgv5wr7jxXZWK5Kp7paGs5UN%2B2KUK8aIAPWaOSo1WedledB30ceZdrVVF3tvSA3uMsDQWquxWPChAXLKYh3VHKsuKoJBqJ6oWJ0BwekJnJgtLgEauBJsyUky6BjPVubYQ%3D%3D
- Then I get 502 ...
- I also try replace nginx with apache2 and get the same error
- By the way, sometime I can connect lxc vncwebsocket success, but most time I only get 502.
Here is my nginx conf:
NGINX:
server{
listen 0.0.0.0:443 ssl;
server_name www.mytest.com;
ssl_certificate certs/server.crt;
ssl_certificate_key certs/server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /api2 {
client_max_body_size 1000m;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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 $scheme;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header Cookie "PVEAuthCookie=PVE%3Aroot%40pam%3A66D6CB4B%3A%3AozA6bNAfd%2Fg%2B2GkstkeYHnmHExFJ9hPIaFKN6tY49jKj2H3F%2Fi3CQUoKYClryg0%2BmESMW93akKh7zW1MewOYbE3ZbTj%2FWBwNiuirKKVYvBOTnTrf5WDsoAP2CYlFD5wwZf4HICOgnx91rCCp%2FNRMR9nRhxbHLJy2BGvSgTEh6gZB%2FfJ%2FhFQeUWE9Pi%2FLGH0E0SZDng356iYH7FJY7j5duipUgz35cTf5%2BLxRHHrqN4IeRiJBIScY%2B7v4xclbW41xaHRm6wrmIS37WJPzkFKyNhk896rErI5rtzxyw4kbff6em1QqubobVYSDXx0n7YqTP0hLg86dq51E2Svv2v%2FFXw%3D%3D";
proxy_connect_timeout 3600s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
proxy_ssl_verify off;
proxy_pass https://10.0.0.1:8006;
}
location /static {
alias /mnt/dist/static/;
}
location @router {
rewrite ^.*$ /index.html last;
}
}
Code:
Nginx Error:
2024/09/03 08:51:33 [error] 40#40: *3 upstream prematurely closed connection while reading response header from upstream, client: 10.0.0.103, server: www.industrial-sandbox.com, request: "GET /api2/json/nodes/www/qemu/101/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D6CDF9%3A%3AeG0ibCM%2BSre3nKqEPtjSUOs%2FDn0PUpmVZhoEiCwaPofFqtLbjZnetpMbBs0GvXOjdbcB7x9BChoJMpnw1I2kl87%2FFXOKRaPAVVKfMf0cYlsvLZ6U90J2yAzg2nOw%2F1VH2WZEFKU%2BStl0kdNubcmJXL651qaVik5ZlVBFgO5zNPUnbxvYWasnG%2FLoSXbV3eg9xKLIKMrvkTLx92IuJUwV93ZXcyT6Ahsg5hahWvtd4dOU0brM5PO0W5l64QgJsa%2F7GcdnY%2FVG35nmp5m2LEl1ey4tKKkLmaM4%2BNMcCN%2BcE4BY1aoCKT7QOucGyT6AK9FHazGsRzrbkg3dFnrZjdAj%2Fg%3D%3D HTTP/1.1", upstream: "https://10.0.0.1:8006/api2/json/nodes/www/qemu/101/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D6CDF9%3A%3AeG0ibCM%2BSre3nKqEPtjSUOs%2FDn0PUpmVZhoEiCwaPofFqtLbjZnetpMbBs0GvXOjdbcB7x9BChoJMpnw1I2kl87%2FFXOKRaPAVVKfMf0cYlsvLZ6U90J2yAzg2nOw%2F1VH2WZEFKU%2BStl0kdNubcmJXL651qaVik5ZlVBFgO5zNPUnbxvYWasnG%2FLoSXbV3eg9xKLIKMrvkTLx92IuJUwV93ZXcyT6Ahsg5hahWvtd4dOU0brM5PO0W5l64QgJsa%2F7GcdnY%2FVG35nmp5m2LEl1ey4tKKkLmaM4%2BNMcCN%2BcE4BY1aoCKT7QOucGyT6AK9FHazGsRzrbkg3dFnrZjdAj%2Fg%3D%3D", host: "10.0.0.103"
10.0.0.103 - - [03/Sep/2024:08:51:33 +0000] "GET /api2/json/nodes/www/qemu/101/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D6CDF9%3A%3AeG0ibCM%2BSre3nKqEPtjSUOs%2FDn0PUpmVZhoEiCwaPofFqtLbjZnetpMbBs0GvXOjdbcB7x9BChoJMpnw1I2kl87%2FFXOKRaPAVVKfMf0cYlsvLZ6U90J2yAzg2nOw%2F1VH2WZEFKU%2BStl0kdNubcmJXL651qaVik5ZlVBFgO5zNPUnbxvYWasnG%2FLoSXbV3eg9xKLIKMrvkTLx92IuJUwV93ZXcyT6Ahsg5hahWvtd4dOU0brM5PO0W5l64QgJsa%2F7GcdnY%2FVG35nmp5m2LEl1ey4tKKkLmaM4%2BNMcCN%2BcE4BY1aoCKT7QOucGyT6AK9FHazGsRzrbkg3dFnrZjdAj%2Fg%3D%3D HTTP/1.1" 502 150 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "-"
Code:
Apache Error:
[Tue Sep 03 02:56:30.933341 2024] [proxy_http:error] [pid 42:tid 42] (70014)End of file found: [client 10.0.0.103:53716] AH01102: error reading status line from remote server 10.0.0.1:8006
[Tue Sep 03 02:56:30.933366 2024] [proxy:error] [pid 42:tid 42] [client 10.0.0.103:53716] AH00898: Error reading from remote server returned by /api2/json/nodes/www/lxc/113/vncwebsocket
10.0.0.103 - - [03/Sep/2024:02:56:25 +0000] "GET /api2/json/nodes/www/lxc/113/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D67AB9%3A%3AJfnYDpSYJGZmaj2YGcWlYqtc05rFgic6yRVNqFwntWtLfT9v9NaSyWW%2F9x2T837QrbPokXkeuD9%2FhtjA1U4Qmc2oIWAlaDjJvQPeiriL%2BJ7WtD6x5bWhnb0xfREBOFMsaKAP596SVJehsgTiGRVxl%2BTzvVPR9uKCtGrIpuUtnpJ9gAIa3JDYLsibY13NmZ5VSbzkYzVZ7eYCutSKRNJ%2FrSG2Gette0fWyBpVFjtuKglYpnSSeU3Nmn4FLXEb86RCWdxRYDUGfjKAdZ0Rjj%2BifNLfTV%2BMJjPMk2xG1%2Fd0p3nQKL8tw4LsAXLBL2h3%2BaxZmYSw8AVCmyj%2BdfL9JTpDuA%3D%3D HTTP/1.1" 502 341
10.0.0.103 - - [03/Sep/2024:03:18:15 +0000] "GET /api2/json/nodes/www/lxc/113/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D67AB9%3A%3AJfnYDpSYJGZmaj2YGcWlYqtc05rFgic6yRVNqFwntWtLfT9v9NaSyWW%2F9x2T837QrbPokXkeuD9%2FhtjA1U4Qmc2oIWAlaDjJvQPeiriL%2BJ7WtD6x5bWhnb0xfREBOFMsaKAP596SVJehsgTiGRVxl%2BTzvVPR9uKCtGrIpuUtnpJ9gAIa3JDYLsibY13NmZ5VSbzkYzVZ7eYCutSKRNJ%2FrSG2Gette0fWyBpVFjtuKglYpnSSeU3Nmn4FLXEb86RCWdxRYDUGfjKAdZ0Rjj%2BifNLfTV%2BMJjPMk2xG1%2Fd0p3nQKL8tw4LsAXLBL2h3%2BaxZmYSw8AVCmyj%2BdfL9JTpDuA%3D%3D HTTP/1.1" 401 13
10.0.0.103 - - [03/Sep/2024:03:19:10 +0000] "GET /api2/json/nodes/www/lxc/113/vncwebsocket?port=5902&vncticket=PVEVNC%3A66D68008%3A%3AfvGqCfHj8oqjUjdIdkVPYCAAyJH5xyi9qGxNWe9%2BtnP30FQl%2BOByAHCSpE4tBigUuDPLIeFrFBV0Q6UvFQKd%2BxPyEdeEtAj43pMj1NGVOJJmn0hmncW%2FkKiuEGdWbi3iS3M69wOQ07wbjoaxyisqTJZT78nBybe0xFM8w38j8ncNN02hJKB%2B9FkfUdPan0Mdp7sJqse7aVnlQfZ7yb7qq13Gsj9G93rQcGaWuk%2BNqSu5le1ZlOckoyxivdHn6xF6hqJsPqW0vLHQrS1cJtfS9fbd8idmY%2BA4CU%2BynTD%2ByLKeNDuBeDndgOv2Q8cxI%2BUJz4%2BKHRxzeDQ63xU5zE%2B1ww%3D%3D HTTP/1.1" 101 -
[Tue Sep 03 03:21:45.282835 2024] [proxy_http:error] [pid 39:tid 39] (70014)End of file found: [client 10.0.0.103:53442] AH01102: error reading status line from remote server 10.0.0.1:8006
[Tue Sep 03 03:21:45.282859 2024] [proxy:error] [pid 39:tid 39] [client 10.0.0.103:53442] AH00898: Error reading from remote server returned by /api2/json/nodes/www/qemu/101/vncwebsocket
10.0.0.103 - - [03/Sep/2024:03:21:40 +0000] "GET /api2/json/nodes/www/qemu/101/vncwebsocket?port=5901&vncticket=PVEVNC%3A66D680A2%3A%3AbbmHwo5wF7yPtheqYHupnIXip9KmhO428MsTdABqPcD9g79t4qHKoFlv%2BbAc0fANQ5Nz4CFIrbzVJwO1lkMhUpnaRSVMDDpjAXy81uWWdxpC8DswOP6yIjypyMu1r6hiOKG%2Fb%2Bd5vZ4TuJWgN%2BKxiC%2Ffjmv5MHrIJUX%2FpdT14i4%2B7q8rYHHVTpyeCC3DyWazzMErb5d1J2geiSWc%2B%2Bq3A%2FqU0NZvNjUvkYaObdFQKt%2F4Xe5izA90rUIQYRwsZcirmtdstLUx71bPZ5woAd7gDRqS3O%2Fu7%2F9i56DjeLK3HEnXVqgzZzp8Fq1EKkYVvwSGA%2FyxXqCdNRGX3ouZqhGbbw%3D%3D HTTP/1.1" 502 341
[Tue Sep 03 03:22:48.312491 2024] [proxy_http:error] [pid 41:tid 41] (70014)End of file found: [client 10.0.0.103:35760] AH01102: error reading status line from remote server 10.0.0.1:8006
[Tue Sep 03 03:22:48.312519 2024] [proxy:error] [pid 41:tid 41] [client 10.0.0.103:35760] AH00898: Error reading from remote server returned by /api2/json/nodes/www/qemu/101/vncwebsocket
Last edited: