Multiple Proxmox Instances

LodgedDrip

New Member
Feb 26, 2021
21
2
3
Hi,

If you've got multiple Proxmox VE instances running on the same IP and different ports, when you log in to the first one it'll work fine, if you log in to the second one it'll then kick you out of the first.

It appears you can never be logged in to more than one Proxmox instance at the same time, is there a way this can be fixed to allow us to do so? It is rather annoying when working between two or more HVs that aren't clustered together on the same IP and you've got to keep logging in to the other.

Thanks.
 
hi,

what do you mean by same IP and different ports? is there a load balancer or proxy in between?

if you log in to the second one it'll then kick you out of the first.
how are the nodes set up exactly? this kinda sounds like browser behavior (if your browser thinks you're logged out or so)
 
hi,

what do you mean by same IP and different ports? is there a load balancer or proxy in between?


how are the nodes set up exactly? this kinda sounds like browser behavior (if your browser thinks you're logged out or so)

For example, we've got two separate clusters with the interfaces available on (https://SAME_IP:49011 and https://SAME_IP:49021). If you log in to the instance on port 49021 while logged in to 49011 then it'll kick you out of 49011 and vice-versa. These ports are dnats through a firewall to the respective HV interface, so use the same IP and different ports.
 
https://SAME_IP:49011 and https://SAME_IP:49021)
the cookies aren't different for ports on the same IP so there's no real fix for that.

you can try some options though:
- using different browser sessions (incognito could work too)
- setting up different subdomains/hostnames for those 2 clusters so that cookies are separated

you could also add two different entries to your hosts file on your system. for example:
Code:
pve1.test.com your.ip.address.here
pve2.test.com your.ip.address.here

and then when connecting from that machine with the modified hosts file, you would connect https://pve1.test.com:49011 and https://pve2.test.com:49021
so it should separate cookies based on hostname
 
the cookies aren't different for ports on the same IP so there's no real fix for that.
Is there no way that the cookies can take in to account the different ports? Or something else that could be used in this instance such as a uuid? Proxmox/Cluster 1 has a different UUID to Proxmox/Cluster 2?
 
Is there no way that the cookies can take in to account the different ports? Or something else that could be used in this instance such as a uuid? Proxmox/Cluster 1 has a different UUID to Proxmox/Cluster 2?

unfortunately no, check rfc6265 for cookies [0]

relevant to your question:
Similarly, cookies for a given host are shared
across all the ports on that host, even though the usual "same-origin
policy" used by web browsers isolates content retrieved via different
ports.

you can try the /etc/hosts file workaround or simply use two separate subdomains if you want to use it this way

[0]: https://datatracker.ietf.org/doc/html/rfc6265