Spice does not connect through script

Hello,
I am using script / usr / share / doc / pve-manager / examples / spice-example-sh by passing the ./spice.sh -u root @ pam -p password 101 192.168.1.2 and is displaying the following error (AUTH OK
Curl: (22) The requested URL returned error: 401 403 Permission check failed (Permission denied - invalid csrf token) and AUTH OK
Curl: (22) The requested URL returned error: 595 Invalid argument). My VM 101 is with the Spice Default monitor and with the tools installed. In the browser I'm getting the spice from the VM but in the script I'm not getting it. Follow PVE configuration
Proxmox-ve: 4.4-88 (running kernel: 4.4.62-1-pve)
Pve-manager: 4.4-13 (running version: 4.4-13 / 7ea56165)
Pve-kernel-4.4.6-1-pve: 4.4.6-48
Pve-kernel-4.4.21-1-pve: 4.4.21-71
Pve-kernel-4.4.15-1-pve: 4.4.15-60
Pve-kernel-4.4.16-1-pve: 4.4.16-64
Pve-kernel-4.4.19-1-pve: 4.4.19-66
Pve-kernel-4.4.40-1-pve: 4.4.40-82
Pve-kernel-4.4.62-1-pve: 4.4.62-88
Lvm2: 2.02.116-pve3
Corosync-pve: 2.4.2-2 ~ pve4 + 1
Libqb0: 1.0.1-1
Pve-cluster: 4.0-50
Qemu-server: 4.0-110
Pve-firmware: 1.1-11
Libpve-common-perl: 4.0-95
Libpve-access-control: 4.0-23
Libpve-storage-perl: 4.0-76
Pve-libspice-server1: 0.12.8-2
Vncterm: 1.3-2
Pve-docs: 4.4-4
Pve-qemu-kvm: 2.7.1-4
Pve-container: 1.0-100
Pve-firewall: 2.0-33
Pve-ha-manager: 1.0-40
Ksm-control-daemon: 1.2-1
Glusterfs-client: 3.5.2-2 + deb8u3
Lxc-pve: 2.0.7-4
Lxcfs: 2.0.6-pve1
Creu: 1.6.0-1
Novnc-pve: 0.5-9
Smartmontools: 6.5 + svn4324-1 ~ pve80
Zfsutils: 0.6.5.9-pve15-bpo80
 
Not a solution, but I briefly tested this some days ago, and I had it working only *after* having FIRST connected through Web GUI and spice console, then closed that console, and tried with the script.
After that it worked with the script, but I did not tried a reboot of Proxmox to test if is something that is permanent or not.
 
Have it running here fine. It is only working with pam and pve, no ldap and no specialcharakters in the password.
 

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!