error: 401 'spice' is not a valid token ID - not able to split into user and token parts
Thanks for your contribution to Proxmox spice solution. I am currently in a failure case : one of the curl calls ends with a 401 error and a message error 'not able to split into user and token parts'.
[i] Building PVE spice connection...
[d] Using CERT_OPTION and CERT_CONFIG: '--insecure '
[d] Using AUTHHEADER: 'Authorization: PVEAPIToken=spice=cef327e3-eee1-428b-bdc0-e2e98a4cb455'
* Trying 192.168.1.42...
* TCP_NODELAY set
* Connected to pve-server.local (192.168.1.42) port 8006 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, Unknown (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [1238 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS Unknown, Certificate Status (22):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: OU=PVE Cluster Node; O=Proxmox Virtual Environment; CN=pve-server.homelab
* start date: Aug 18 00:39:06 2022 GMT
* expire date: Aug 17 00:39:06 2024 GMT
* issuer: CN=Proxmox Virtual Environment; OU=0edeac4c-9ff5-4817-90b8-373ae943efe2; O=PVE Cluster Manager CA
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
} [5 bytes data]
* TLSv1.3 (OUT), TLS Unknown, Unknown (23):
} [1 bytes data]
> GET /api2/json/nodes HTTP/1.1
> Host: pve-server.local:8006
> User-Agent: curl/7.58.0
> Accept: */*
> Authorization: PVEAPIToken=spice=cef327e3-eee1-428b-bdc0-e2e98a4cb455
>
{ [5 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [217 bytes data]
* TLSv1.3 (IN), TLS Unknown, Certificate Status (22):
{ [1 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [217 bytes data]
* TLSv1.3 (IN), TLS Unknown, Unknown (23):
{ [1 bytes data]
* The requested URL returned error: 401 'spice' is not a valid token ID - not able to split into user and token parts
* stopped the pause stream!
* Closing connection 0
} [5 bytes data]
* TLSv1.3 (OUT), TLS Unknown, Unknown (21):
} [1 bytes data]
* TLSv1.3 (OUT), TLS alert, Client hello (1):
} [2 bytes data]
curl: (22) The requested URL returned error: 401 'spice' is not a valid token ID - not able to split into user and token parts
[d] Authenticating on 'pve-server.local:8006'
[d] Obtained AUTH_RESPONSE:
[e] Error: VMTYPE could not be detected!
[e] Are you sure that the ID of your VM or CT really is '125'?
[e] If yes, are you sure that you granted the correct permissions to 'spice' for '125' (i.e. token + role)?
[e] Double check and try again!
[e] Exiting!
Edited by Frederic S