Open mjacksonhill opened 5 days ago
Hi, The problem you are experiencing is probably due to a shared user home directory on your compute cluster. SIRIUS persistently stores refresh tokens so that a normal desktop user does not have to re-login each time. These persistent refresh tokens are single-use (for security reasons) and are replaced after each refresh. If this single-use policy is violated, the entire token chain is invalidated and a relogin is required.
Long story short, if a token (default location: ~/.sirius-6.x
) is shared between different SIRIUS instances, the token's single use policy is violated and the token chain becomes invalid. Currently this can be resolved by ensuring that each SIRIUS instance uses its own location to store the token. This can be specified using the --workspace
parameter.
FYI: The next release will introduce the option to not persist tokens, which will avoid this problem altogether.
Closing this issue. Feel free to reopen if this answer does not solve your problem.
Hi,
Thanks for the insight into the token mechanism. I had gleaned some of this from reading the threads on other issues, but this definitely helps. I've played with the --workspace
parameter but cannot get it to work. Attempting to log in at all from a compute node fails:
sirius login -u email@address -p
sirius login --user-env=SIRIUS_USER --password-env=SIRIUS_PASS
#both give following error
Nov 23, 2024 7:01:10 PM de.unijena.bioinf.ms.frontend.SiriusCLIApplication run
SEVERE: Unexpected Error!
java.lang.RuntimeException: Error when storing refresh token. You may have to re-login.
The remaining option of logging in interactively on a login node and copying the folder to a new location passed as --workspace
does not work:
sirius login -u email@address -p
cp -r /home/mat/hill/.sirius-6.0 /some/other/directory/test-workspace
#from compute node
sirius [...] --workspace /some/other/directory/test-workspace
SEVERE: Error when using given refresh_token. Not logged in. Re-login with PW Flow might be necessary
Bug description
I am trying to automate login for some eventual scripting using SLURM. I can only ever get login to work using interactive login (-u -p) from the terminal. I have read some of the other issues on here relating to the refresh/access tokens on compute clusters, but I can't figure out what to change to make this work. Confusingly, it doesn't even work on the login node.
I should also note that all my failed login attempts are preceded by a successful one-- somehow the token is not being imported correctly upon subsequent startups. Is there any way to make this work? Am I missing some key step in storing the token? My sirius configuration directory is the default one.
Steps To Reproduce
Successful Login:
Unsuccessful Login Case 1 (env variables on login or compute node):
results in:
Unsuccessful Login Case 2 (interactive on compute node):
System Info: