Unable to remove sessions from console

Hi

I had a working cluster and I need to remove agent servers from it, I disabled the vsmagent service & rebooted the server, all the users are logged out and my agent server is become free to use.

but the problem is it retained some users on server’s console (check the attached pic) I have tried to abandon session but it is giving error and not removing users from there I have also tried it by restarting the master node but no luck

here are the logs that I am getting in /var/log/vsmserver.log

2023-09-07 13:34:30 WARNING vsmserver.session: VSM Agent agentserver:904 responded with permission denied verifying sessions.

2023-09-07 13:34:30 INFO vsmserver.session: User with uid 0 requested termination of agentserver:75

2023-09-07 13:34:30 WARNING vsmserver.session: User user1 tried to kill vanished session

2023-09-07 13:34:48 WARNING vsmserver.loadinfo: VSM Agent agentserver:904 responded with permission denied in request for loadinfo. Marking as down.

2023-09-07 13:34:49 WARNING vsmserver.loadinfo: VSM Agent agentserver:904 responded with permission denied in request for loadinfo. Marking as down.

2023-09-07 13:34:49 WARNING vsmserver.loadinfo: VSM Agent agentserver:904 responded with permission denied in request for loadinfo. Marking as down.

Hello,

You wrote that you disabled the vsmagent service, but the logs indicate that it can’t communicate with the agent, getting a Permission denied. Is vsmserver allowed to communicate with this agent?

Kind regards,
Martin

actually I have created another master server and added that agent server to that cluster, ultimately releasing the current master server

And the above logs are from the old master server?

yes its from old master server, once these errors will remove I will add this server as agent to that new cluster by disabling this server’s vsmserver service.

If the old vsmserver will not be used anymore, and the agent has been decommissioned and moved to a new master, I don’t see any reason why you couldn’t just remove the session database from the old master. The old session database is residing /var/lib/vsm/sessions. Then stop the vsmserver service and configure it as an agent to your new cluster.

Regards,
Martin

can we forcefully remove these sessions

If you want to start clean and remove all session information from old vsmserver:

$ sudo systemctl stop vsmserver
$ sudo rm /var/lib/vsm/sessions
$ sudo systemctl start vsmserver

Kind regards,
Martin

thanks this has removed the orphaned sessions