I am trying to get a basic custom docker image built with repo2docker to run in a multi environment configuration (also doesn’t work in a single image configuration either). The docker image has jupyterhub installed and it is the same version as the host install.
I’ve tried multiple versions modes of configuring the images under single user, but they all load the example image except for one which returns “spawn failed” after 30s timeout. Can someone help me get this working? Here’s some more information.
su.yaml
singleuser:
profileList:
- display_name: "Custom Jupyter Environment"
description: "Test custom environment"
kuberspawner_override:
image: org_nameinfra/org_name_elg7186:latest
tag: latest
- display_name: "Datascience environment"
description: "Python, R, and Julia."
kubespawner_override:
image: jupyter/datascience-notebook:2343e33dec46
- display_name: "Spark environment"
description: "The Jupyter Stacks spark image"
kubespawner_override:
image: jupyter/all-spark-notebook:2343e33dec46
Event Log
Server requested
2021-08-05T04:02:55.440462Z [Normal] Successfully assigned jhub-staging/jupyter-my_username to aks-nodepool1-12473058-vmss000000
2021-08-05T04:03:29Z [Normal] AttachVolume.Attach succeeded for volume "pvc-e5ea889e-2b16-48d1-a885-07092ba776d9"
2021-08-05T04:03:59Z [Normal] Container image "jupyterhub/k8s-network-tools:0.11.1" already present on machine
2021-08-05T04:03:59Z [Normal] Created container block-cloud-metadata
2021-08-05T04:03:59Z [Normal] Started container block-cloud-metadata
2021-08-05T04:04:00Z [Normal] Pulling image "org_nameinfra/org_name_elg7186:latest"
2021-08-05T04:04:00Z [Normal] Successfully pulled image "org_nameinfra/org_name_elg7186:latest" in 279.796643ms
2021-08-05T04:04:00Z [Normal] Created container notebook
2021-08-05T04:04:00Z [Normal] Started container notebook
2021-08-05T04:04:02Z [Normal] Successfully pulled image "org_nameinfra/org_name_elg7186:latest" in 194.467572ms
Spawn failed: Server at http://10.240.0.5:8888/user/my_username/ didn't respond in 30 seconds
Hub log:
No config at /etc/jupyterhub/config/values.yaml
Loading /etc/jupyterhub/secret/values.yaml
Loading extra config: templates
[I 2021-08-05 04:02:11.510 JupyterHub app:2349] Running JupyterHub version 1.3.0
[I 2021-08-05 04:02:11.511 JupyterHub app:2379] Using Authenticator: oauthenticator.github.GitHubOAuthenticator-0.12.3
[I 2021-08-05 04:02:11.511 JupyterHub app:2379] Using Spawner: kubespawner.spawner.KubeSpawner-0.15.0
[I 2021-08-05 04:02:11.511 JupyterHub app:2379] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.3.0
[I 2021-08-05 04:02:11.512 JupyterHub app:1420] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
[W 2021-08-05 04:02:11.547 JupyterHub app:1695] No admin users, admin interface will be unavailable.
[W 2021-08-05 04:02:11.547 JupyterHub app:1696] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2021-08-05 04:02:11.548 JupyterHub app:1725] Not using allowed_users. Any authenticated user will be allowed.
[I 2021-08-05 04:02:11.670 JupyterHub reflector:201] watching for pods with label selector='component=singleuser-server' in namespace jhub-staging
[I 2021-08-05 04:02:11.757 JupyterHub reflector:201] watching for events with field selector='involvedObject.kind=Pod' in namespace jhub-staging
[W 2021-08-05 04:02:11.774 JupyterHub _version:70] jupyterhub version 1.3.0 != jupyterhub-singleuser version 0.9.4. This could cause failure to authenticate and result in redirect loops!
[I 2021-08-05 04:02:11.774 JupyterHub app:2077] org_name-infra still running
[I 2021-08-05 04:02:11.778 JupyterHub app:2077] my_username still running
[I 2021-08-05 04:02:11.778 JupyterHub app:2416] Initialized 2 spawners in 0.167 seconds
[I 2021-08-05 04:02:11.781 JupyterHub app:2628] Not starting proxy
[I 2021-08-05 04:02:11.790 JupyterHub app:2664] Hub API listening on http://:8081/hub/
[I 2021-08-05 04:02:11.790 JupyterHub app:2666] Private Hub API connect url http://hub:8081/hub/
[I 2021-08-05 04:02:11.790 JupyterHub app:2679] Starting managed service cull-idle
[I 2021-08-05 04:02:11.791 JupyterHub service:339] Starting service 'cull-idle': ['python3', '-m', 'jupyterhub_idle_culler', '--url=http://localhost:8081/hub/api', '--timeout=3600', '--cull-every=600', '--concurrency=10']
[I 2021-08-05 04:02:11.794 JupyterHub service:121] Spawning python3 -m jupyterhub_idle_culler --url=http://localhost:8081/hub/api --timeout=3600 --cull-every=600 --concurrency=10
[I 2021-08-05 04:02:11.824 JupyterHub proxy:319] Checking routes
[I 2021-08-05 04:02:11.824 JupyterHub proxy:399] Adding default route for Hub: / => http://hub:8081
[W 2021-08-05 04:02:11.827 JupyterHub proxy:343] Adding missing route for /user/org_name-infra/ (Server(url=http://10.240.0.12:8888/user/org_name-infra/, bind_url=http://10.240.0.12:8888/user/org_name-infra/))
[W 2021-08-05 04:02:11.827 JupyterHub proxy:343] Adding missing route for /user/my_username/ (Server(url=http://10.240.0.16:8888/user/my_username/, bind_url=http://10.240.0.16:8888/user/my_username/))
[I 2021-08-05 04:02:11.828 JupyterHub proxy:257] Adding user org_name-infra to proxy /user/org_name-infra/ => http://10.240.0.12:8888
[I 2021-08-05 04:02:11.828 JupyterHub proxy:257] Adding user my_username to proxy /user/my_username/ => http://10.240.0.16:8888
[I 2021-08-05 04:02:11.839 JupyterHub app:2739] JupyterHub is now running at http://:8000
[I 2021-08-05 04:02:12.029 JupyterHub log:181] 200 GET /hub/api/users (cull-idle@::1) 26.22ms
[I 2021-08-05 04:02:33.555 JupyterHub log:181] 200 GET /hub/api/authorizations/token/[secret] (my_username@10.240.0.16) 25.93ms
[I 2021-08-05 04:02:35.555 JupyterHub log:181] 200 GET /hub/home (my_username@10.240.0.4) 38.30ms
[I 2021-08-05 04:02:36.708 JupyterHub proxy:281] Removing user my_username from proxy (/user/my_username/)
[I 2021-08-05 04:02:36.711 JupyterHub spawner:1997] Deleting pod jupyter-my_username
[I 2021-08-05 04:02:40.295 JupyterHub log:181] 202 DELETE /hub/api/users/my_username/server (my_username@10.240.0.4) 3.89ms
[I 2021-08-05 04:02:41.184 JupyterHub log:181] 200 GET /hub/error/503?url=%2Fhub%2Fapi%2Fusers%2Fmy_username%2Fserver (@10.240.0.28) 8.74ms
[I 2021-08-05 04:02:41.189 JupyterHub pages:167] Server my_username is already active
[I 2021-08-05 04:02:41.190 JupyterHub log:181] 302 GET /hub/spawn/my_username -> /hub/spawn-pending/my_username (my_username@10.240.0.4) 3.80ms
[I 2021-08-05 04:02:41.237 JupyterHub pages:402] my_username is pending stop
[I 2021-08-05 04:02:41.242 JupyterHub log:181] 200 GET /hub/spawn-pending/my_username (my_username@10.240.0.4) 7.27ms
[I 2021-08-05 04:02:46.359 JupyterHub pages:402] my_username is pending stop
[I 2021-08-05 04:02:46.360 JupyterHub log:181] 200 GET /hub/spawn-pending/my_username (my_username@10.240.0.4) 3.30ms
[I 2021-08-05 04:02:46.618 JupyterHub base:1110] User my_username server took 9.910 seconds to stop
[I 2021-08-05 04:02:46.619 JupyterHub log:181] 204 DELETE /hub/api/users/my_username/server (my_username@10.240.0.4) 9914.83ms
[I 2021-08-05 04:02:51.586 JupyterHub log:181] 200 GET /hub/spawn-pending/my_username (my_username@10.240.0.4) 15.30ms
[I 2021-08-05 04:02:53.234 JupyterHub log:181] 200 GET /hub/spawn/my_username (my_username@10.240.0.4) 8.12ms
[I 2021-08-05 04:02:55.374 JupyterHub spawner:1875] Attempting to create pvc claim-my_username, with timeout 3
[I 2021-08-05 04:02:55.376 JupyterHub log:181] 302 POST /hub/spawn/my_username -> /hub/spawn-pending/my_username (my_username@10.240.0.4) 56.45ms
[I 2021-08-05 04:02:55.400 JupyterHub spawner:1887] PVC claim-my_username already exists, so did not create new pvc.
[I 2021-08-05 04:02:55.403 JupyterHub spawner:1840] Attempting to create pod jupyter-my_username, with timeout 3
[I 2021-08-05 04:02:55.437 JupyterHub pages:402] my_username is pending spawn
[I 2021-08-05 04:02:55.448 JupyterHub log:181] 200 GET /hub/spawn-pending/my_username (my_username@10.240.0.4) 16.62ms
[I 2021-08-05 04:03:11.859 JupyterHub proxy:319] Checking routes
[I 2021-08-05 04:04:11.846 JupyterHub proxy:319] Checking routes
[W 2021-08-05 04:04:30.103 JupyterHub user:738] my_username's server never showed up at http://10.240.0.5:8888/user/my_username/ after 30 seconds. Giving up
[I 2021-08-05 04:04:30.103 JupyterHub spawner:1997] Deleting pod jupyter-my_username
[E 2021-08-05 04:04:30.159 JupyterHub gen:623] Exception in Future <Task finished name='Task-119' coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py:895> exception=TimeoutError("Server at http://10.240.0.5:8888/user/my_username/ didn't respond in 30 seconds")> after timeout
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 618, in error_callback
future.result()
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py", line 902, in finish_user_spawn
await spawn_future
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/user.py", line 719, in spawn
await self._wait_up(spawner)
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/user.py", line 766, in _wait_up
raise e
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/user.py", line 733, in _wait_up
resp = await server.wait_up(
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/utils.py", line 235, in wait_for_http_server
re = await exponential_backoff(
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/utils.py", line 183, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://10.240.0.5:8888/user/my_username/ didn't respond in 30 seconds