Thinlinc login failed. The SSH connection succeeded - VSMServer corrupt session DB

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

  1. Fail over to the secondary broker (dc02). Confirm that logons work through the cluster VIP before proceeding.

  2. Compare the session database on both brokers. On dc01, /var/lib/vsm/sessions was 0 bytes. On dc02, the file was 3,777 bytes.

  3. Stop vsmserver on the failed broker (dc01) and back up the session database on both brokers.

  4. Copy the database from the working broker (dc02) to a temporary location on dc01, using scp.

  5. 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
    
  6. Start vsmserver on dc01 and 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.

It’s difficult to know for sure why this happened, but I have seen it on occasion due to things like /var filling up, or SELinux contexts not being applied properly. Anyway - you did the right thing! :slight_smile:

Aaron, its weird why it corrupted like that. At first I thought the OS updates to the VDA earlier was the issue. I kind of think it may be the remote shutdown via the hypervisor console might have been the cause.