====== Proxmox - Troubleshooting - noNVC fails to connect with Server disconnected (code: 1006) ======
Trying to connect to a console within Proxmox returns the following error message: **Server disconnected (code: 1006)**.
TASK ERROR: command '/usr/bin/termproxy 5901 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
----
===== Regenerate Certificates =====
SSH into the Proxmox host.
pvecm updatecerts --force
systemctl restart pvedaemon.service
systemctl restart pveproxy.service
**NOTE:** The certificates are out of sync, so regenerate them.
----
===== Revert to default SSL configuration =====
rm -rf /etc/pve/pve-root-ca.pem
rm -rf /etc/pve/priv/pve-root-ca.key
rm -rf /etc/pve/nodes/pve/pve-ssl.pem
rm -rf /etc/pve/nodes/pve/pve-ssl.key
rm /etc/pve/pve-root-ca.pem /etc/pve/priv/pve-root-ca.key
pvecm updatecerts -f
systemctl restart pveproxy
----
===== Check Logs =====
cat /var/log/daemon.log | grep -e pveproxy -e pvedaemon
returns:
...
Jul 21 09:11:48 pve pvedaemon[191274]: successful auth for user 'root@pam'
Jul 21 09:11:55 pve pvedaemon[192394]: starting termproxy UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam:
Jul 21 09:11:55 pve pvedaemon[191276]: starting task UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam:
Jul 21 09:12:05 pve pvedaemon[192394]: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
Jul 21 09:12:05 pve pvedaemon[191276]: end task UPID:pve:0002EF8A:002A3230:60F7D6CB:vncshell::root@pam: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
Jul 21 09:12:14 pve pvedaemon[192565]: starting vnc proxy UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam:
Jul 21 09:12:14 pve pvedaemon[191276]: starting task UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam:
Jul 21 09:12:29 pve pvedaemon[191276]: end task UPID:pve:0002F035:002A39AA:60F7D6DE:vncproxy:102:root@pam: OK
Jul 21 09:12:33 pve pvedaemon[192703]: starting lxc termproxy UPID:pve:0002F0BF:002A4103:60F7D6F1:vncproxy:202:root@pam:
Jul 21 09:12:33 pve pvedaemon[191274]: starting task UPID:pve:0002F0BF:002A4103:60F7D6F1:vncproxy:202:root@pam:
Jul 21 09:12:33 pve pvedaemon[191276]: successful auth for user 'root@pam'
...
**NOTE:** The vncproxy is failing.
----
===== Check if the websockify service is running =====
ps aux |grep websoc
**NOTE:** The **socat** package needs to be installed on the server.
----
===== Another Approach =====
Obtain a certificate to allow the Proxmox web interface to work over https.
Then, add this certificate to the list of trusted certificates on the remote PC being used to access Proxmox.
openssl s_client -showcerts -connect 192.168.1.95:8006 /dev/null | openssl x509 -outform PEM > pve.pem
**NOTE:** Where:
* **192.168.1.95:8006** is the address of the web interface of the Proxmox hypervisor.
* **pve.pem** is the output file of the certificate.
Then just add this certificate and set the rights to it **Always trust**.
Reload the Proxmox web page and access to the console should work.