ERROR vsmserver: Error loading session database: End of file reading /var/lib/vsm/sessions
ERROR vsmserver: Session database needs manual recovery.
ERROR vsmserver: Exiting
The service was failing to start, and /run/vsmserver.pid was missing because the VSM server exited during startup.
Recovery
-
Fail over to the secondary broker (
dc02). Confirm that logons work through the cluster VIP before proceeding. -
Compare the session database on both brokers. On
dc01,/var/lib/vsm/sessionswas 0 bytes. Ondc02, the file was 3,777 bytes. -
Stop
vsmserveron the failed broker (dc01) and back up the session database on both brokers. -
Copy the database from the working broker (
dc02) to a temporary location ondc01, usingscp. -
Restore the database on
dc01, ensuring the correct ownership and permissions:sudo install -o root -g root -m 600 \ /tmp/sessions.good-16102026 \ /var/lib/vsm/sessions -
Start
vsmserverondc01and check the service status and logs.
The log confirmed that the recovered database loaded successfully:
INFO vsmserver.session: Loaded 1 sessions for 1 users from file
The cluster remained healthy, with both nodes online and the VIP staying on dc02. Logons were working again.
Cause
I don’t know what caused the session database to become corrupted. The brokers have been working for months, and the only change that evening was updating the VDA master VM and running a test.
Has anyone else encountered this, or have any suggestions on what might cause the session database to become empty or corrupted?
Hopefully this saves someone a bit of troubleshooting time if they run into the same issue.
