-
Notifications
You must be signed in to change notification settings - Fork 60
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
Unbound JUPYTERHUB_SERVICE_PREFIX leads to 404 #44
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
ZOMG I can't believe this works! @Jon-Lillis thank you so much for this! Finally got my new Jhub / ProfilesSpawner / SlurmSpawner / Jlab setup working! +1 on the "WHAT IS GOING ON HERE" sentiment. Just logging the None value of client.server is enough to somehow mysteriously make it work?! For a second I thought maybe touching the 'server' attribute would somehow initialize the traitlet and then it would get linked, but no, that is not happening. |
Cf. jupyterhub/jupyterhub#3170 I was taking a stab at #41 today and I think I at least cured the reproducer of its traitlets 4/5 problem. I'll probably try this fix myself tomorrow and report back. My sshspawners are fine but my batchspawners aren't, and it's because of this no |
The See in JupyterHub The reason it gets populated when you read it is that The fix may be to just drop |
|
I met the same problem. I am trying to use
Therefore, there must be something wrong with
|
Just doing this was enough for me: |
The fix here was useful for me ( Running the ui from a container in front of a LSF system ). |
Hi all, I’m in the process of setting up JupyterHub (with wrapspawner and batchspawner) to better utilise Jupyter on a Slurm cluster, but I’m running into the following issue.
On a successful spawn of the single user session on a cluster node (as indicated by the Slurm output), the user is redirected to '/hostname/user/username/' as expected, but the page 404s.
The issue seems to be the
JUPYTERHUB_SERVICE_PREFIX
environment variable that’s passed to the single-user session via the job submission script being unbound, instead of ‘/user/username/’.Following this problem back through the code, I found myself in the
construct_child()
function of wrapspawner.When
construct_child()
is called,self._server
contains the correct value. However, following the snippet of code above,self.child_spawner.server
- which is later used to defineJUPYTERHUB_SERVICE_PREFIX
- is None, rather than equal toself._server
as I would expect. All other values passed intoself.child_class
are maintained inself.child_spawner
.What’s odd is that this
self.child_spawner.server
variable behaves very strangely. Doing absolutely anything to it in the lines that follow the snippet above will solve the 404 problem. If I manually setself.child_spawner.server
toself._server
straight afterself.child_class
is created and applied toself.child_spawner
,JUPYTERHUB_SERVICE_PREFIX
gets populated correctly and the 404 issue goes away. However, both setting the value to None and simply printing it via aself.log.debug(str(self.child_spawner.server))
statement also fixes it.I’ve been working through the spawner code to try to make sense of this, but I’m not having much luck.
Can anyone explain this strange behaviour?
Could this be related to the patch I had to implement here: jupyterhub/batchspawner#127 (comment)?
If not, what causes the server value passed to the child_class to not be set correctly, and how can this safely be fixed in a more permanent way?
Conda environment
Jupyterhub config file
Jupyterhub output log for run with debug line patch in place
Slurm log for run with patch in place
Jupyterhub output log for run without debug line patch in place
Slurm log for run without patch in place
Thanks in advance.
The text was updated successfully, but these errors were encountered: