Problems with VNC-Console over API

Stefan_Herrmann

New Member
Sep 23, 2013
5
0
1
Hello,

we have some problems with the vnc-console (especially via api) and pve 3.0/3.1.
I managed to open VNC-Sessions via. webinterface by increasing $timeout in /usr/share/perl5/PVE/API2/Qemu.pm to 20 (no other changes made so far).
VNC via. webinterface now works but needs one reload before opening the session.
Error from log:
Code:
[COLOR=#000000][FONT=tahoma]no connection : Connection timed out[/FONT][/COLOR][COLOR=#000000][FONT=tahoma]
TASK ERROR: command '/bin/nc -l -p 5900 -w 20 -c '/usr/bin/ssh -T -o BatchMode=yes <ip4> /usr/sbin/qm vncproxy 695 2>/dev/null'' failed: exit code 1
[/FONT][/COLOR]
pveversion:
Code:
proxmox-ve-2.6.32: 3.1-109 (running kernel: 2.6.32-22-pve)
pve-manager: 3.1-3 (running version: 3.1-3/dc0e9b0e)
pve-kernel-2.6.32-22-pve: 2.6.32-107
pve-kernel-2.6.32-23-pve: 2.6.32-109
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-1
pve-cluster: 3.0-7
qemu-server: 3.1-1
pve-firmware: 1.0-23
libpve-common-perl: 3.0-6
libpve-access-control: 3.0-6
libpve-storage-perl: 3.0-10
pve-libspice-server1: 0.12.4-1
vncterm: 1.1-4
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-17
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.0-2
VNC-Console via API however doesn't work at all (it times out with same error in log and offers to login again).
Other API-functions (like creating backups, changing vm settings, power-functions, ...) work perfectly.
We tried with different Java-versions and clients.
How can we get the vnc-console working on first-try (I think that would also the fix for the problem with api-vnc)?
 
API-Console also works with every other proxmox-server we have (still running pve-2.3).
Despite that particular problem we never experienced problems with pve - so great job. :)


We have only two servers running pve-3.0/3.1 and both show the described behavior.
The two servers are installed with basic debian-wheezy and then proxmox - so not updated ones from 2.3 to 3.0.
They are running as two-node-cluster (no h/a and no shared storage).
I can see the netcat-process via ps -aux and it's possible to connect to the specified port via telnet once the process is there - so it's not a networking-problem.
There must be something inside the system preventing the first connect (as I described - VNC-Console only works after clicking the reload-button).


Is there a way to reconfigure the components for console without the need to shutdown running vms or rebooting the server?
What else could I try to solve that issue?
 
The only thing not usual is a perl-warning.
Here's the syslog-Output for both nodes on all 3 methods of opening the console:

opening console via. Webinterface (fails):
Code:
Sep 24 11:29:07 prox1 pvedaemon[1030154]: <root@pam> starting task UPID:prox1:00030C99:13CF4186:52415B63:vncproxy:695:root@pam:
Sep 24 11:29:07 prox1 pvedaemon[199833]: starting vnc proxy UPID:prox1:00030C99:13CF4186:52415B63:vncproxy:695:root@pam:
Sep 24 11:29:07 prox1 pvedaemon[199833]: WARNING: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/PVE/API2/Qemu.pm line 1305.
Sep 24 11:29:27 prox1 pvedaemon[199833]: command '/bin/nc -l -p 5900 -w 20 -c '/usr/bin/ssh -T -o BatchMode=yes [IP PROX2] /usr/sbin/qm vncproxy 695 2>/dev/null'' failed: exit code 1
Sep 24 11:29:27 prox1 pvedaemon[1030154]: <root@pam> end task UPID:prox1:00030C99:13CF4186:52415B63:vncproxy:695:root@pam: command '/bin/nc -l -p 5900 -w 20 -c '/usr/bin/ssh -T -o BatchMode=yes [IP PROX2] /usr/sbin/qm vncproxy 695 2>/dev/null'' failed: exit code 1
Code:
Sep 24 11:29:07 prox2 pmxcfs[26505]: [status] notice: received log
Sep 24 11:29:27 prox2 pmxcfs[26505]: [status] notice: received log
opening Console via API-CALL (fails):
Code:
Sep 24 11:30:49 prox1 pmxcfs[7964]: [status] notice: received log
Sep 24 11:30:49 prox1 pmxcfs[7964]: [status] notice: received log
Sep 24 11:30:52 prox1 pvedaemon[1030152]: <root@pam> successful auth for user 'root@pam'
Sep 24 11:31:09 prox1 pmxcfs[7964]: [status] notice: received log
Code:
Sep 24 11:30:49 prox2 pvedaemon[106348]: <root@pam> successful auth for user 'root@pam'
Sep 24 11:30:49 prox2 pvedaemon[100056]: <root@pam> starting task UPID:prox2:0004990A:13CF78B4:52415BC9:vncproxy:695:root@pam:
Sep 24 11:30:49 prox2 pvedaemon[301322]: starting vnc proxy UPID:prox2:0004990A:13CF78B4:52415BC9:vncproxy:695:root@pam:
Sep 24 11:30:52 prox2 pmxcfs[26505]: [status] notice: received log
Sep 24 11:31:09 prox2 pvedaemon[301322]: command '/bin/nc -l -p 5900 -w 20 -c '/usr/sbin/qm vncproxy 695 2>/dev/null'' failed: exit code 1
Sep 24 11:31:09 prox2 pvedaemon[100056]: <root@pam> end task UPID:prox2:0004990A:13CF78B4:52415BC9:vncproxy:695:root@pam: command '/bin/nc -l -p 5900 -w 20 -c '/usr/sbin/qm vncproxy 695 2>/dev/null'' failed: exit code 1
Opening Console via. Webinterface and instantly pushing reload-Button (works)
Code:
Sep 24 11:31:56 prox1 pvedaemon[200467]: starting vnc proxy UPID:prox1:00030F13:13CF83A1:52415C0C:vncproxy:695:root@pam:
Sep 24 11:31:56 prox1 pvedaemon[1030154]: <root@pam> starting task UPID:prox1:00030F13:13CF83A1:52415C0C:vncproxy:695:root@pam:
Sep 24 11:31:56 prox1 pvedaemon[200467]: WARNING: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/PVE/API2/Qemu.pm line 1305.
Sep 24 11:32:00 prox1 pvedaemon[1030153]: <root@pam> starting task UPID:prox1:00030F15:13CF8560:52415C10:vncproxy:695:root@pam:
Sep 24 11:32:00 prox1 pvedaemon[200469]: starting vnc proxy UPID:prox1:00030F15:13CF8560:52415C10:vncproxy:695:root@pam:
Sep 24 11:32:00 prox1 pvedaemon[200469]: WARNING: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/PVE/API2/Qemu.pm line 1305.
Sep 24 11:32:09 prox1 pmxcfs[7964]: [status] notice: received log
Code:
Sep 24 11:31:56 prox2 pmxcfs[26505]: [status] notice: received log
Sep 24 11:32:00 prox2 pmxcfs[26505]: [status] notice: received log
Sep 24 11:32:09 prox2 pvedaemon[105710]: <root@pam> successful auth for user 'root@pam'
Sep 24 11:32:09 prox2 pvedaemon[88818]: worker 100056 finished
Sep 24 11:32:09 prox2 pvedaemon[88818]: starting 1 worker(s)
Sep 24 11:32:09 prox2 pvedaemon[88818]: worker 301376 started
Sep 24 11:32:16 prox2 pmxcfs[26505]: [status] notice: received log
 

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!