[SOLVED] No noVNC with Proxy: exit code 4

papanito

New Member
Feb 20, 2017
11
2
1
45
I have configured my proxmox environment to be accessed via a remot proxy so instead mydomain.com:8006 I can access it via proxmox.mydomain.com. Hoever, this does not work for noVNC. After updating the certificates according to https://pve.proxmox.com/wiki/HTTPS_Certificate_Configuration_(Version_4.x_and_newer) this also does not work for the console, but I rather get this error
Code:
Virtual Environment 5.1-43
Virtual Machine 103 (win10-dev) on node 'proxmox'
Logs
()
timed out waiting for client
TASK ERROR: command '/usr/bin/termproxy 5900 --path /vms/103 --perm VM.Console -- /usr/sbin/qm terminal 103 -escape 0' failed: exit code 4

My apache configuration - the ssl certificate is issues by letsencrypt:
Code:
<IfModule mod_ssl.c>
   <VirtualHost *:443>
      ServerName proxmox.mydomain.com
      ServerAdmin webmaster@mydomain.com
      ErrorLog ${APACHE_LOG_DIR}/proxmox_error.log
      CustomLog ${APACHE_LOG_DIR}/proxmox_access.log combined
      SSLEngine on
      SSLProxyEngine on
      SSLProxyVerify none
      SSLProxyCheckPeerCN off
      SSLProxyCheckPeerName off
      SSLProxyCheckPeerExpire off
      SSLCertificateFile      /etc/letsencrypt/live/mydomain.com/fullchain.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem

      ProxyRequests off
      ProxyPreserveHost on
      RequestHeader unset Accept-Encoding
  
      LoadModule proxy_module modules/mod_proxy.so
      LoadModule proxy_http_module modules/mod_proxy_http.so

       <Directory />
            AllowOverride none
            Require all denied
       </Directory>

       <Location />
            ProxyPass https://mydomain.com:8006/
            ProxyPassReverse https://mydomain.com:8006/
        </Location>

        <IfModule mod_headers.c>
             Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
        </IfModule>
   </VirtualHost>
</IfModule>

However, when I access my proxmox via https://mydomain.com:8006 I can access noVNC and terminal are working fine. So somehow my proxy is not configured correctly. Any idea what is missing/wrong?
 
Last edited:
we use a websocket for the terminal/novnc connection, so you also have to configure your proxy to proxy the websocket connections (e.g. the upgrade header must be set etc.)
 

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!