Spawned single-user Notebook is unable to connect to the Jupyterhub API
mkempenaar opened this issue · 1 comments
Hi,
Thanks for the very nice description on how to setup a jupyterHub using docker, it seems like a perfect middle ground between the Kubernetes and tljh solutions.
Unfortunately I'm unable to get it setup properly because I'm receiving the following error after logging in on the spawned Jupyter notebook
`[... SingleUserNotebookApp singleuser:389] Failed to connect to my Hub at http://jupyterhub:8081/hub/api (attempt 1/5). Is it running?``
Eventually it times out after five tries. I've made minor changes to the docker-compose.yml
file namely the traefik.frontend.rule
and I've removed the oath2_server
as for now I'm going to use the PAM authenticator (eventually using NIS).
Something I've noticed in the logs from running docker-compose up
:
Adding default route for Hub: / => http://jupyterhub:8081 jupyterhub | info: [ConfigProxy] Adding route / -> http://jupyterhub:8081 jupyterhub | info: [ConfigProxy] 201 POST /api/routes/ jupyterhub | JupyterHub app:1912] JupyterHub is now running at http://:8000
while the last address is invalid, the hub is working and I can login using a user account I manually add by attaching to the hub process (I'm using portainer for those tasks).
If you have any idea what might cause this or if there is anything I can try to get more information, I would really appreciate this.
Looks like the spawned Jupyter server cannot talk back to the Hub. This line is passing the Hub address to the spawned servers:
The value of HUB_IP
being set here:
jupyterhub-docker/docker-compose.yml
Line 14 in d2e20a3
The value must match the name of the container in docker-compose.yml
:
jupyterhub-docker/docker-compose.yml
Line 7 in d2e20a3
Maybe you changed something? Post your docker-compose.yml
here, I'll tell you if I see something.