PVWA - Session expired after few minutes - How to check and prove if LB is responsible
158
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 15:54 PM
Objective
PVWA sessions are terminated after an idle period that is way shorter than the session idle timeout
This article explains how to check and prove if LB is responsible.
Environment
11.5;11.7;12.2;12.6;13.0 Privileged Access Manager (PAM, self-hosted) Password Vault Web Access
Procedure
The first thing to check is if the issue occurs when you log in to the direct URLs of the single PVWAs bypassing the LB.
If the issue only occurs when using the LB then the most probable reason is that the LB is not correctly set to keep the session on the same PVWA (sticky session) and you may get a session expired after only few minutes of idle session.
To verify and prove if this is the case, you need to look into the session logs.
Session logs are only created when debugging is enabled on PVWA.
Each user that logs on to PVWA generates a session log in the PVWA server that holds the session.
So, enable debugging on PVWA and reproduce the issue.
In PVWA, navigate to "Administration" --> Go to "Options" -->
Select "Logging" and set parameters as of the following:
* DebugLevel=High
* InformationLevel=High
Reproduce the issue by leaving the PVWA session idle for a time that does not exceed the idle session timeout which is by default 20 minutes.
When you try to resume the session this will show errors or just expires and redirect you to the login page.
Now, search for the session log for the affected user on the PVWA servers.
Unfortunately, the session logs name are not showing the username so you need to manually look into each session log and search for the affected user until you find the right one.
You will have to search for the session log in all the available PVWAs.
Once you have identified the session log related to the affected user, note the file name for later.
Look at the entries at the bottom of the file to check the time the session got idle.
If the LB has suddenly switched your session to another PVWA, you should see a session log with the same name so, search for the same file name in the other PVWAs.
If you find the file with the same name on another PVWA, open it and look at the time of the first line and see if it matches the time you tried to resume the session.
In the one of the first lines you will probably see the following errors:
CASSM005E No session instance was found for this token
CASW032D Error attaching session token
followed by
PASWS001E Error occurred: Connection to the Vault was terminated
Also, you won't find the user name anywhere in the log.
This proves that the LB has redirected your existing session from one PVWA to another where the latest is not able to find a session for your token and therefore it terminates your session.
Even though Load Balancer implementation is possible, Idira does not support the implementation and only provides general guidelines.
Please read the following article for the LB implementation general guidelines:
https://community.cyberark.com/s/article/Load-Balancer-Implementation-with-PVWA-General-Guidelines
In the article I linked, when we say we do not support it, we mean that we cannot help you configuring the LB or investigating any third party Load balancer issue.
We can only give some guidelines on what should be set and any LB related issue should be investigated by the administrators of the LB.
The online documentation also provide basic instructions on how to set PVWA with LB but not how to set the LB.