Skip to content
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

c.KubeSpawner.default_url doesn’t work #531

Closed
EtgarSH opened this issue Oct 13, 2021 · 8 comments
Closed

c.KubeSpawner.default_url doesn’t work #531

EtgarSH opened this issue Oct 13, 2021 · 8 comments

Comments

@EtgarSH
Copy link

EtgarSH commented Oct 13, 2021

Bug description

When I change the c.KubeSpawner.default_url attribute in jupyterhub_config.py file to /lab, nothing changes.

Expected behaviour

The Jupyterlab homepage to be shown instead of Jupyter Notebook.

Actual behaviour

Jupyter Notebook is shown.

How to reproduce

  1. Change the attribute to /lab.
  2. Launch the server for the user.
  3. /tree is still shown instead of /lab.
@manics
Copy link
Member

manics commented Oct 15, 2021

Could you show us your full JupyterHub config with secrets redacted, versions of all components, and show us your Dockerfiles?

@consideRatio
Copy link
Member

consideRatio commented Oct 15, 2021

I bet this is a duplicate of #493 (comment) in practice.

2. I think the logic to silently ignore the traitlets args, notebook_dir, default_url when cmd is unset is problematic and should lead to a warning at least.

I assume cmd is no longer set to jupyterhub-singleuser.

@EtgarSH
Copy link
Author

EtgarSH commented Oct 21, 2021

I bet this is a duplicate of #493 (comment) in practice.

  1. I think the logic to silently ignore the traitlets args, notebook_dir, default_url when cmd is unset is problematic and should lead to a warning at least.

I assume cmd is no longer set to jupyterhub-singleuser.

Do you have any idea of a workaround solution to deal with this issue?

@manics
Copy link
Member

manics commented Oct 21, 2021

This might have a proper fix in JupyterHub 2 which passes some spawner parameters as environment variables instead of command line arguments.

It's on my to-do list of things to check for the next major Z2JH release but I haven't had time 🙁.

Can you show us your full configuration?

@EtgarSH
Copy link
Author

EtgarSH commented Oct 24, 2021

This might have a proper fix in JupyterHub 2 which passes some spawner parameters as environment variables instead of command line arguments.

It's on my to-do list of things to check for the next major Z2JH release but I haven't had time 🙁.

Can you show us your full configuration?

c.JupyterHub.authenticator_class =c.JupyterHub.spawner_class =kubespawner.KubeSpawnerc.KubeSpawner.image =something that is based on the latest jupyterlab imagec.KubeSpawner.debug = True

c.Spawner.notebook_dir = “…”
c.Spawner.default_url =/labc.KubeSpawner.default_url =/labc.KubeSpawner.working_dir = “…”

c.KubeSpawner.start_timeout = 1200
c.KubeSpawner.http_timeout = 120
`

@consideRatio
Copy link
Member

Are you using kubespawner without the jupyterhub helm chart?

Well, configure c.Spawner.cmd to jupyterhub-singleuser and i think you will have default_url be passed.

@EtgarSH
Copy link
Author

EtgarSH commented Oct 25, 2021

Are you using kubespawner without the jupyterhub helm chart?

Well, configure c.Spawner.cmd to jupyterhub-singleuser and i think you will have default_url be passed.

No I’m not using Helm, why is it recommended?

I tried it, but for some reason the pod of the user now crashes each time he logins.
It says “Crash Loop Back-off” and the logs don’t contain any errors but just end with a line saying that it exits the application - jupyter-notebook.

ianabc pushed a commit to callysto/infrastructure that referenced this issue Jul 20, 2022
After updating the user image, we noticed that the hub was launching
usres straight into /lab rather than /tree. This change (temporarily)
reverts that. I think the underlying problem is described here

  * jupyterhub/kubespawner#531

So there will be changes to come with JupyterHub 2.x releases and this
can be revisited then.

Signed-off-by: Callysto Sysadmin <[email protected]>
@manics
Copy link
Member

manics commented Mar 30, 2023

I'll close this as there's since been a lot of developments including some major updates. If you're still having problems please could you open an issue on the community forum https://discourse.jupyter.org/ with a full reproducible example? Thanks!

@manics manics closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants