[SOLVED] SPICE: Unable To connect to the graphic server

riptide_wave

Member
Mar 21, 2013
73
2
8
Minnesota, USA
Hello, I currently have a 3 server proxmox cluster and I am completely unable to use SPICE on any VM, on any node. The problem is when I download the spiceproxy.vv file and run it, VirtViewer gives me the following error: Unable to connect to the graphic server "file location/name". I checked and made sure all servers, and my desktop have proper synced clocks, and they do. I even tested this on 3 other windows computers and they all have the same issue. I checked my firewall, and made sure the ports for SPICE are open.

Maybe some of my debug information may help? I would really like to get this fixed.

pveversion
Code:
root@Node-1-01:~# pveversion -vproxmox-ve-2.6.32: 3.1-113 (running kernel: 2.6.32-25-pve)
pve-manager: 3.1-17 (running version: 3.1-17/eb90521d)
pve-kernel-2.6.32-24-pve: 2.6.32-111
pve-kernel-2.6.32-25-pve: 2.6.32-113
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-2
pve-cluster: 3.0-7
qemu-server: 3.1-5
pve-firmware: 1.0-23
libpve-common-perl: 3.0-6
libpve-access-control: 3.0-6
libpve-storage-perl: 3.0-13
pve-libspice-server1: 0.12.4-2
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

spiceproxy --debug
Code:
root@Node-1-01:/usr/bin# spiceproxy --debug699701: ACCEPT FH12 CONN1
close connection AnyEvent::Handle=HASH(0x32c7bc0)
699701: CLOSE FH12 CONN0

remote-viewer.exe "spiceproxy.vv" --debug
Code:
C:\Program Files\VirtViewer\bin>remote-viewer.exe "D:\Downloads\spiceproxy.vv" --debugC:\Program Files\VirtViewer\bin>(remote-viewer.exe:2304): remote-viewer-DEBUG: I
nsert window 0 0000000001F3D000
(remote-viewer.exe:2304): remote-viewer-DEBUG: fullscreen display 0: 0
(remote-viewer.exe:2304): remote-viewer-DEBUG: Opening display to D:\Downloads\spiceproxy.vv
(remote-viewer.exe:2304): remote-viewer-DEBUG: Guest D:\Downloads\spiceproxy.vvhas a spice display
(remote-viewer.exe:2304): remote-viewer-DEBUG: After open connection callback fd=-1
(remote-viewer.exe:2304): remote-viewer-DEBUG: Opening connection to display atD:\Downloads\spiceproxy.vv
(remote-viewer.exe:2304): remote-viewer-DEBUG: New spice channel 0000000001F94F40 SpiceMainChannel 0
(remote-viewer.exe:2304): remote-viewer-DEBUG: Checking full screen auto-conf(remote-viewer.exe:2304): remote-viewer-DEBUG: auto-conf disabled
(remote-viewer.exe:2304): remote-viewer-DEBUG: notebook show status 0000000001F3C150
(remote-viewer.exe:2304): GSpice-WARNING **: HTTP proxy connection failed: 401 invalid ticket
(remote-viewer.exe:2304): remote-viewer-DEBUG: main channel: failed to connect
(remote-viewer.exe:2304): remote-viewer-DEBUG: Disposing window 0000000001F3D000
(remote-viewer.exe:2304): remote-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0

/etc/pve ls -l
Code:
root@Node-1-01:/etc/pve# ls -l
total 5
-rw-r----- 1 root www-data  451 Sep 21 19:58 authkey.pub
-rw-r----- 1 root www-data 1680 Sep 21 21:14 cluster.conf
-rw-r----- 1 root www-data  294 Sep 21 20:16 cluster.conf.old
-rw-r----- 1 root www-data   16 Sep 21 19:53 datacenter.cfg
lrwxr-x--- 1 root www-data    0 Dec 31  1969 local -> nodes/Node-1-01
drwxr-x--- 2 root www-data    0 Sep 21 19:58 nodes
lrwxr-x--- 1 root www-data    0 Dec 31  1969 openvz -> nodes/Node-1-01/openvz
drwx------ 2 root www-data    0 Sep 21 19:58 priv
-rw-r----- 1 root www-data 1350 Sep 21 19:58 pve-root-ca.pem
-rw-r----- 1 root www-data 1679 Sep 21 19:58 pve-www.key
lrwxr-x--- 1 root www-data    0 Dec 31  1969 qemu-server -> nodes/Node-1-01/qemu-server
-rw-r----- 1 root www-data  492 Sep 21 20:21 storage.cfg
-rw-r----- 1 root www-data  404 Oct 14 12:36 user.cfg
-rw-r----- 1 root www-data  405 Sep 30 19:20 vzdump.cron

/etc/pve/priv ls -l
Code:
root@Node-1-01:/etc/pve/priv# ls -l
total 3
-rw------- 1 root www-data 1679 Sep 21 19:58 authkey.key
-rw------- 1 root www-data 1583 Oct 10 23:21 authorized_keys
-rw------- 1 root www-data 2652 Oct 10 23:21 known_hosts
drwx------ 2 root www-data    0 Sep 21 20:17 lock
-rw------- 1 root www-data 1679 Sep 21 19:58 pve-root-ca.key
-rw------- 1 root www-data    3 Oct 10 23:14 pve-root-ca.srl
-rw------- 1 root www-data   70 Sep 21 20:17 shadow.cfg

I thought it might be my SSL certs, so I ran pvecm updatecerts -force, but I still have this issue.
 
Last edited:
Tickets are only valid for 30 seconds, so you need to start remote-viewer automatically after download.

What remote-viewer version do you use?
 
Tickets are only valid for 30 seconds, so you need to start remote-viewer automatically after download.

What remote-viewer version do you use?
Well the issue happens even when I click the file instantly after download, I just show the debug output above in case it has any helpful information. I have tested this with virt-viewer-x64-0.5.7.msi and virt-viewer-x64-0.5.6.msi on multiple machines, and all give the same exact error.
 
For a test, I created a VM in my cluster with proxmox, and then in that proxmox VM I created a VM with SPICE as the display, and I was able to successfully connect to it. So, it seems there is something wrong with my proxmox cluster, not my computers.
 
Did some more testing, even when directly connected to the server LAN, I am still unable to use SPICE, which gives the same error proving it is not a network or firewall issue. Also, my server and system clock have the exact same time/date in the system clock, so that is not the issue. Any advice?
 
you could try to take proxmox/ticketing out of the equation to see whether or not it actually is a networking/firewall issue. To do that:

a) set the display device of the VM youre testing with to Default (NOT spice!), and then
b) add the following line to your /etc/pve/qemu-server/VMID.conf (may or may not wish to change port/password)

Code:
args: -spice port=12345,password=ANYTHING -device virtio-serial,id=spice,bus=pci.0,addr=0x9 -chardev spicevmc,id=vdagent,name=vdagent

then after starting up the vm, just use virt viewer to connect to it using the URI spice://<IP>:<PORT>
 
Any hints in /var/log/syslog?
Nothing that I can see. :(

you could try to take proxmox/ticketing out of the equation to see whether or not it actually is a networking/firewall issue. To do that:

a) set the display device of the VM youre testing with to Default (NOT spice!), and then
b) add the following line to your /etc/pve/qemu-server/VMID.conf (may or may not wish to change port/password)

Code:
args: -spice port=12345,password=ANYTHING -device virtio-serial,id=spice,bus=pci.0,addr=0x9 -chardev spicevmc,id=vdagent,name=vdagent

then after starting up the vm, just use virt viewer to connect to it using the URI spice://<IP>:<PORT>

Just tested it this way, and it seems to work perfect... So this leads me to think its an issue with spiceproxy, because it didn't work when I was directly connected to the server LAN.
 
I don't think this has been resolved. My Proxmox host has been updated as of right now and I'm still unable to connect to any VM via Spice. I've tried multiple Windows 7 systems and I get the same thing every time.
 
Dietmar,

You're asking: "What kind of ssl certificated do you use (default ones)?"

I'm running 3.4-6/102d4547 and I've got commercial certs applied. Why would anything other than the stock self-signed certs be a problem? Or maybe I'm misinterpreting the reason for your question? In any case, I'm seeing the same issue as the OP.
 
Thanks and its working for me like below.

spice://proxmox server ipaddress :7200

Can we do like below?

spice://vm ip address :7200 ?


Thanks
 

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!