Closed casparvl closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
From your logs, it seems only Jupyter server
has started and not notebook server. Maybe that is where that you need to look more?
Could you try to navigate to /2022/user/casparl/lab
which should give you a JupyterLab interface? If you can share your JupyterHub config, that would help to find the problem.
From your logs, it seems only Jupyter server has started and not notebook server. Maybe that is where that you need to look more?
That seems to just be a change in the logging for JupyterHub 3.X, but Jupyter server running
essentially means the same thing.
I did experiment (a lot) more. I found out it had to be something in my virtual environment. Note that we have jupyter-server-proxy
and jupyterlmod
extensions enabled. If I ran from a virtual envrionment that had
source jh_2022_functional/bin/activate
pip install jupyterhub==3.0.0
cd batchspawner/
pip install .
cd ..
pip install jupyter-server-proxy==3.2.2
pip install jupyterlmod==3.0.0
I did not get my 404 error anymore. The batchspawner directory here contains a checkout for the current main branch, so that I get the specific commits for JupyterHub 3.X support.
However, if I did
source jh_2022_non_functional/bin/activate
pip install jupyterhub==3.0.0
cd batchspawner/
pip install .
cd ..
pip install jupyter-server-proxy
pip install jupyterlmod
It failed. Now, my original environment was neither of these two (we use a module environment, as we are on an HPC system). That has a module for jupyter-server-proxy 3.2.2, but the fact that it doesn't work in that environment tells me there is probably some dependency of jupyter-server-proxy that breaks things - and for which the version is different if I do pip install jupyter-server-proxy==3.2.2
compared to the one from the module environment.
Anyway, I'll close this issue here, as it seems to be unrelated to batchspawner. If I figure out more concretely what package/version was the culprit, I'll report back here in case people run into this in the future.
Fair enough! There are no differences in deps of jupyter-server-proxy
between 3.2.2
and latest
. However, for jupyterlmod
the only difference in the dependency between 3.0.0
and latest
is that 3.0.0
has notebook as explicit dependency. That opens a question are you sure that notebook
is installed in jh_2022_non_functional
? If you havent installed any other packages apart from the ones that you showed in the comment, it is due to missing notebook
package in the environment.
Just to report here in case others run into it: the 404
had nothing to do with batchspawner. This issue occurs if you have both jupyterhub
and jupyter-server
installed. In that case, jupyter-server
is used by default to serve the notebook interface, but the classic notebook interface can only be served if the nbclassic
package is also present (see here). Installing the nbclassic
package resolved my issue.
It is a bit of a strange situation, as one might wonder why nbclassic
is not a dependency of something. The problem is, it is only required if the combination of jupyter-server
and jupyterhub
are present. Which of those two would need to list it as a dependency? Neither, really...
What is really annoying is that there is no clearer error message for this situation (but again, not something that is up to batchspawner to solve ;-)). Anyway, mystery solved :)
Bug description
Initially, I ran into https://github.com/jupyterhub/batchspawner/pull/247 . Since this was merged, and others have reported that PR solved their issue, I tried to run from
main
(https://github.com/jupyterhub/batchspawner/commit/2a9eda060a875a2b65ca9521368fe052a09c3266 to be exact), at least on the Jupyter Notebook Server side (I don't control the JupyterHub myself, so it's not so easy for me to make changes there).It resolves the initial issue: my Jupyter Notebook Server starts now. However, where as soon as the spawner redirects me to the page that would normally show the Jupyter Notebook Server (with directory listing etc), I get a 404.
Logs from the JupyterHub:
Logs from the Jupyter Notebook Server
For comparison: an older JupyterHub (2.X I believe) setup gave me the following logs on the Jupyter Notebook Server side:
The only notable difference I spot is that the redirect is slightly different (going to
/2021/user/casparl/tree?
instead of to/2021/user/casparl/tree/?
), and the fact that I then get redirected to/2021/hub/api/oauth2/authorize?...
.I've tried to debug this myself, but I'm at a loss: despite reading the documentation on spawners, I don't understand well enough what steps the spawner should be doing to figure out what could potentially go wrong. If anyone with more expertise on this has some ideas, I'd love to hear them :)