[SOLVED] token already exists

pavlos

Active Member
Dec 17, 2017
20
1
43
66
I have 3 hosts, pve4, pve5, and pve6. I was able to add pve4 (Remote ID 100), pve6 (Remote ID 600) but cannot add pve5, I get an error token already exists).
Is there a way to clear the token so I can add this host?
Is the Remote ID just some descriptive text? (eg. pve5 in front office or pve6 in back room).
Thank you.

Screenshot 2025-11-24 at 10-21-05 pve6 - Proxmox Datacenter Manager.png
 
Is there a way to clear the token so I can add this host?
the question is why is there a token with that name already? is there something/someone that is using that token?

if you really want to clear it, there are 3 possibilities:

* you go to the pve ui and delete the token -> every user of that token will not be able to connect anymore
* use a different token name for pdm
* go to the pve ui and refresh the secret for that token and enter the token details directly instead of letting it auto-create

Is the Remote ID just some descriptive text? (eg. pve5 in front office or pve6 in back room).
yes the remote id is just the id which is used in pdm to reference it
 
I tried to add pve5 earlier but could not add it. Gave it Remote ID 500, then 555, then 888. None of these IDs exist. Still, I cannot add pve5.
I tried using the secret for that token, I get api error 400. I assume somewhere in the pdm, the token is kept.

1764074150029.png
 
I looked in /var/log/proxmox-datacenter-manager/api/auth.log

2025-11-25T04:22:37-07:00: successful auth for user 'root@pam'
2025-11-25T05:33:53-07:00: authentication failure; rhost=[::ffff:10.0.0.41]:44372 msg=invalid csrf token - format error - wrong number of parts.
2025-11-25T05:34:14-07:00: successful auth for user 'root@pam'
2025-11-25T05:51:57-07:00: authentication failure; rhost=[::ffff:10.0.0.41]:54040 msg=invalid csrf token - format error - wrong number of parts.
2025-11-25T05:52:09-07:00: successful auth for user 'root@pam'
2025-11-25T06:09:29-07:00: authentication failure; rhost=[::ffff:10.0.0.41]:41546 msg=invalid csrf token - format error - wrong number of parts.
2025-11-25T06:09:41-07:00: successful auth for user 'root@pam'
 
I will wait for a future release.
Even with a brand new install of pdm (I followed the First Steps PDM mini howto), I still get errors when I try to add hosts.
I must be doing something wrong.
 
2025-11-25T05:33:53-07:00: authentication failure; rhost=[::ffff:10.0.0.41]:44372 msg=invalid csrf token - format error - wrong number of parts.
this looks weird and maybe unrelated, can you post the versions of the pdm and pve here?

what user are you logged into with at the pdm ?
 
I have pve5 and pve6, both pveversion: pve-manager/9.1.1/42db4a6cf33dac83 (running kernel: 6.17.2-1-pve)

I installed pdm 0.9.4 BETA on pve6. From the UI (pve6:8443) I'm trying to add a remote host, pve5

root@pve6:~# openssl s_client -connect pve5:8006 </dev/null 2>/dev/null | openssl x509 -noout -fingerprint -sha256
sha256 Fingerprint=5E:83:7F:2B:3D:C0:66:CD:E1:CB:8B:7E:98:07:A9:3D:37:AE:7A:1F:F0:20:34:26:D7:E7:8A:7A:99:2B:97:C9

to verify

root@pve5:~# pvenode cert info
│ fingerprint │ 5E:83:7F:2B:3D:C0:66:CD:E1:CB:8B:7E:98:07:A9:3D:37:AE:7A:1F:F0:20:34:26:D7:E7:8A:7A:99:2B:97:C9 │


Screenshots trying to add pve5

1764157359232.png1764157386740.png
1764157412718.png1764157441126.png



1764157463395.png
 
I experienced the same thing.I installed the new PDM and even after connecting, the same error occurs.
Connecting to a PVE server that has never been connected via PDM before will succeed.
Could it be that the PVE you are connecting to has a token?
 
Solved!
1) Visit the target PVE.
2) Select Datacenter.
3) Select Permission->API Token.
4) You will then find the API Token that PDM created. Delete it.
 
Thank you!
I was able to get rid of the token on pve5, I will do the same on pve4 and pve6 hoping I can bring in all remotes.
Marked it [SOLVED]
 
Last edited: