Interactive sessions can't connect after idle

We’re running version 3.1.16 and having a similar problem to this older topic.

Our users launch an interactive session, step away, and then when they try to reconnect they see a VNC error rejecting the authentication:

I can sometimes replicate this simply by disconnecting from the session and reloading the browser window. Then when I try to reconnect I see this error. The “view only” link works to connect to the session and see what is running.

I’ve been unable to find a fix for this and the users have to cancel their jobs and start over. Does anyone have any suggestions?

Thanks,
Dori

Sorry for the delay in response Dori.

When you say “they try to reconnect” are you saying they try to connect on the same page/refresh that page or are they trying to reconnect through the button Launch <cluster> Desktop>? The former won’t work because these passwords are one time use. Every time you connect using a given password, it regenerates a new one for the next time. The latter should continue to work because the card should be able to pick up the newer password.

When I refresh the page once, I just get authentication failed. But if I continue to refresh the page - I get that message - authentication failed. client temporarily disabled.

However if I navigate back to OnDemand, the Launch <cluster> Desktop button still works using the new password.

So I think it may be a user error - refreshing that page won’t work, but using the Launch <cluster> Desktop button in OnDemand should continue to work.

If that button stops working, let me know and we’ll continue to look at it.

Hi Jeff,

No problem! We were looking into things on our end too. I am able to replicate this on demand (no pun intended!) now. I start up a session (desktop, app, doesn’t matter) and click the button to launch it. Once that new tab or window with the session is open, it works. If I close the tab and click the button to launch it again, I get the connection error. We thought it might be a firewall issue but confirmed in our dev environment that isn’t the case. There isn’t anything in the user nginx logs or the job logs indicating a problem. Are there other logs we could be looking at that might indicate what might be causing the problem?

Thanks,
Dori

Interesting.

You should see messages like this in your output.log as you generate new passwords. Every time you successfully connect it should regenerate a new password. Maybe you’re clicking the card too soon as it hasn’t picked up the new password yet? Or maybe there’s some NFS lag where the file is being updated on the compute node, but the web node is still reading the old file?

When I click the button on our 4.2 instance, it disables it for a bit so I can’t click it that fast.

(polkit-mate-authentication-agent-1:3387467): polkit-mate-1-WARNING **: 10:57:01.157: Unable to determine the session we are in: No session for pid 3387467
Setting VNC password...
Generating connection YAML file...
Setting VNC password...
Generating connection YAML file...
Setting VNC password...
Generating connection YAML file...
Setting VNC password...
Generating connection YAML file...

Or maybe the page is failing to update the card. If you open your network tab on your ‘my interactive sessions’ page you should see something like this where the browser is querying the backend for new information (including a new password).