The dockerspawner is failing, I think. On the front end, it shows the error:
Spawn failed: Server at http://x.x.x.x:8888/user/xxx/ didn't respond in 30 seconds
That’s cool. It’s not helpful, though. The jupyterhub DEBUG logs show absolutely nothing about what the dockerspawner is doing:
May 14 07:27:01 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [I 2020-05-14 07:27:01.739 JupyterHub app:2631] JupyterHub is now running at http://:8000
May 14 07:27:01 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:01.739 JupyterHub app:2233] It took 0.285 seconds for the Hub to start
May 14 07:27:13 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [I 2020-05-14 07:27:13.282 JupyterHub log:174] 200 GET /hub/login (@::ffff:10.64.13.67) 24.11ms
May 14 07:27:23 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [I 2020-05-14 07:27:23.018 JupyterHub log:174] 200 GET /hub/login (@::ffff:10.64.14.219) 1.10ms
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [I 2020-05-14 07:27:27.149 JupyterHub log:174] 302 GET / -> /hub/ (@::ffff:10.64.13.67) 0.80ms
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.400 JupyterHub base:330] Refreshing auth for xxx
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.400 JupyterHub user:242] Creating <class 'dockerspawner.dockerspawner.DockerSpawner'> for xxx:
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [I 2020-05-14 07:27:27.403 JupyterHub log:174] 302 GET /hub/ -> /hub/spawn (xxx@::ffff:x.x.x.x) 11.07ms
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.672 JupyterHub pages:195] Triggering spawn with default options for xxx
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.673 JupyterHub base:825] Initiating spawn for xxx
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.673 JupyterHub base:832] 0/100 concurrent spawns
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal jupyterhub[20935]: [D 2020-05-14 07:27:27.673 JupyterHub base:837] 0 active servers
May 14 07:27:27 ip-x-x-x-x.eu-west-1.compute.internal python3[20935]: pam_loginuid(login:session): set_loginuid failed
My jupyterhub_config.py looks like this:
import os
c = get_config()
c.JupyterHub.log_level = 'DEBUG'
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
c.DockerSpawner.image = 'jupyter/base-notebook'
spawn_cmd = "start-singleuser.sh --user={username} --notebook-dir=/home/{username}"
c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd })
c.DockerSpawner.remove = True
network_name = 'jupyterhub-network'
c.DockerSpawner.use_internal_ip = True
c.DockerSpawner.network_name = network_name
c.DockerSpawner.extra_host_config = { 'network_mode': network_name }
notebook_dir = '/home/{username}'
c.DockerSpawner.notebook_dir = notebook_dir
c.DockerSpawner.volumes = { notebook_dir: notebook_dir }
c.DockerSpawner.remove_containers = True
c.JupyterHub.hub_ip = '0.0.0.0'
c.JupyterHub.hub_port = 8080
I’m guessing that the start-singleuser.sh script is failing to start, but I wouldn’t know why because I can’t see what’s going on. Maybe it doesn’t like the --user
and --notebook-dir
options? If I don’t specify anything here, the notebooks will be stored in /home/jovyan
inside the container, which means that nothing is persisted to notebook_dir
.
How can I get a clue what is going on here?