JupyterHub checks wrong server url after restart
See original GitHub issueBug description
I use a subclass of BatchSpawner (created for Univa Grid Engine), JupyterHub 2.0.0. If I restart JupyterHub it uses wrong url to check if user’s server is still running. It concludes that server is not running and deletes cluster job.
Expected behaviour
Cluster jobs should survive JupyterHub restart
Actual behaviour
logs contain lines like these (note port 0)
Verifying that tryauuum is running at http://my-hostname:0/user/tryauuum/
Of course server is not reachable via this url. After some time JupyterHub runs qdel
to delete cluster job.
The bug is probably with my custom class
I see that after restart there still is a correct port and IP in sqlite database. I want to ask, where exactly in code server IP and port are read from servers
table of sqlite database? do I have to implement it manually?
All I see in code in terms of restoring IP and port from database is this iteration over list of spawners here https://github.com/jupyterhub/jupyterhub/blob/aa0ce1c88a8e34da1779cb13d3f36f81a6a24df7/jupyterhub/app.py#L2517-L2535
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Should be fixed by https://github.com/jupyterhub/jupyterhub/pull/3859
I think you’re right,
get_env
probably shouldn’t modify the state. It also shouldn’t be called except duringSpawner.start()
, so I’m not entirely sure how/why this is coming up, but that much is easy to fix.