-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User symlink files in /run/ are not deleted when server is stopped, causing 500 internal server error #76
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
@minrk do you think this is related to the recent fix to hide tokens from the process list? |
I encountered the same problem (except in my case the links were at runlink = '/run/jupyterhub-{}'.format(self.user.name)
if os.path.lexists(runlink) and not os.path.exists(runlink):
self.log.info('Removing stale link %s', runlink)
os.unlink(runlink)
This is too hard-coded to be a general solution (especially since the path in my case is different to the original report), but may be useful to others until a proper solution is developed. Also, I see the following messages in the logs when a user server is started up. I'm not sure if the migration message is relevant to this issue.
|
@bcbnz Your solution worked like a charm. Thank you for taking the time to post this workaround. For those who have the same symlink format I did, modify the first line of bcbnz's code to:
|
For me adding The default set by systemdspawner Using Ubuntu 20.04 and jupyterhub 1.3.0 |
change the code in systemd.py
The log said [Error17] File exists, so I assume so changed as
so check the file exist then create. |
Hey all, I believe the more straightforward solution might be to just set [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html - but look for the section starting with |
Bug:
If a user stops their JupyterHub server through their control panel and then attempts to start it again, they will receive an error when systemdspawner spawns the user:
"500 : Internal Server Error Error in Authenticator.pre_spawn_start: FileExistsError [Errno 17] File exists: '/run/jupyter-username-singleuser'
The user cannot connect until I manually delete the user's symlink file in /run/.
Perhaps this is a bug where the user's symlink isn't automatically deleted from /run/ when they stop their server. When the spawner tries to start their server again, it erroneously thinks the server is already running and throws the 500 error.
Additional information:
I'm using a GitLab OAuthenticator with systemdspawner's dynamic_spawning set to true, if that helps.
Ubuntu 20.04
JupyterHub 1.2.2
Latest version of systemdspawner as of Dec. 15, 2020
The text was updated successfully, but these errors were encountered: