That’s also what I think because I tested this config on my local network (a vlan with a few machines) and it worked perfectly, I was able to spawn images etc.
Then when I deployed it in “production” mode on the web server, which is on another vlan (but the workers are still in my vlan), I new I would have to ask the IT to open some ports, that’s what I did, and now it works up to this moment, when the singleuser servers have to start.
I have a custom SwarmSpawner class, how do I set the log level to debug in this case ?
class CustomSwarmSpawner(SwarmSpawner):
[...]
c.JupyterHub.spawner_class = CustomSwarmSpawner
Because I tried to set:
c.SwarmSpawner.debug = True
c.DockerSpawner.debug = True
c.ConfigurableHTTPProxy.debug = True
but it doesn’t change anything for either SwarmSpawner nor DockerSpawner. However I do get the debug logs for ConfigurableHTTPProxy, here they are:
# docker service logs -f jupyter_jupyterhub
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.794 JupyterHub app:2859] Running JupyterHub version 4.0.2
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.794 JupyterHub app:2889] Using Authenticator: ldapauthenticator.ldapauthenticator.LDAPAuthenticator-1.3.2
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.794 JupyterHub app:2889] Using Spawner: builtins.CustomSwarmSpawner
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.795 JupyterHub app:2889] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.0.2
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.841 JupyterHub app:1709] Writing cookie_secret to /srv/jupyterhub/jupyterhub_cookie_secret
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.878 alembic.runtime.migration migration:213] Context impl SQLiteImpl.
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.878 alembic.runtime.migration migration:216] Will assume non-transactional DDL.
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:48.886 alembic.runtime.migration migration:621] Running stamp_revision -> 0eee8c825d24
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.023 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.045 JupyterHub roles:238] Adding role admin for User: cretin
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.048 JupyterHub roles:238] Adding role user for User: cretin
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.049 JupyterHub app:1984] Not using allowed_users. Any authenticated user will be allowed.
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.070 JupyterHub app:2928] Initialized 0 spawners in 0.002 seconds
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.075 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.076 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.seven_days
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.077 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.thirty_days
jupyter_jupyterhub.1.xyczlxc5gte4@www | [W 2024-03-08 13:29:49.077 JupyterHub proxy:746] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.077 JupyterHub proxy:750] Starting proxy @ http://:8000
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.387 [ConfigProxy] info: Proxying http://*:8000 to (no default)
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.390 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.655 [ConfigProxy] info: 200 GET /api/routes
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.655 JupyterHub app:3178] Hub API listening on http://jupyterhub:8081/hub/
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.657 [ConfigProxy] info: 200 GET /api/routes
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.658 JupyterHub proxy:477] Adding route for Hub: / => http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.661 [ConfigProxy] info: Adding route / -> http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.661 [ConfigProxy] info: Route added / -> http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:49.662 [ConfigProxy] info: 201 POST /api/routes/
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:49.662 JupyterHub app:3245] JupyterHub is now running at http://:8000
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:51.645 [ConfigProxy] debug: PROXY WEB /hub/ to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:51.662 JupyterHub log:191] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@::ffff:10.0.0.2) 1.78ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:51.664 [ConfigProxy] debug: Not recording activity for status 302 on /
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:51.675 [ConfigProxy] debug: PROXY WEB /hub/login to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:51.716 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2F (@::ffff:10.0.0.2) 39.30ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:57.547 [ConfigProxy] debug: PROXY WEB /hub/login to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:57.812 JupyterHub base:837] User logged in: cretin
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:57.813 JupyterHub log:191] 302 POST /hub/login?next=%2Fhub%2F -> /hub/ (cretin@::ffff:10.0.0.2) 259.32ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:57.815 [ConfigProxy] debug: Not recording activity for status 302 on /
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:57.833 [ConfigProxy] debug: PROXY WEB /hub/ to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [W 2024-03-08 13:29:57.860 JupyterHub configurable:200] Config option `remove` not recognized by `CustomSwarmSpawner`.
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:57.862 JupyterHub log:191] 302 GET /hub/ -> /hub/spawn (cretin@::ffff:10.0.0.2) 25.96ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:57.863 [ConfigProxy] debug: Not recording activity for status 302 on /
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:29:57.877 [ConfigProxy] debug: PROXY WEB /hub/spawn to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:29:58.352 JupyterHub log:191] 200 GET /hub/spawn (cretin@::ffff:10.0.0.2) 472.74ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:30:00.996 [ConfigProxy] debug: PROXY WEB /hub/spawn to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:01.136 JupyterHub jupyterhub_config:483] User Mattermost ID: sug6ijojujgzdxmohensu358sw
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:01.235 JupyterHub jupyterhub_config:504] Request successful
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:01.236 JupyterHub jupyterhub_config:508] Channel ID: 5trs4xuxs3ywfnednwxbi5etjy
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:01.550 JupyterHub provider:659] Creating oauth client jupyterhub-user-cretin
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:01.595 JupyterHub dockerspawner:1262] pulling dsimb/gpu-jupyter-v1.6_cuda-12.0_ubuntu-22.04:x86_64_v4
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:02.495 JupyterHub log:191] 302 POST /hub/spawn?_xsrf=[secret] -> /hub/spawn-pending/cretin?_xsrf=[secret] (cretin@::ffff:10.0.0.2) 1494.24ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:30:02.496 [ConfigProxy] debug: Not recording activity for status 302 on /
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:30:02.515 [ConfigProxy] debug: PROXY WEB /hub/spawn-pending/cretin to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:02.522 JupyterHub pages:398] cretin is pending spawn
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:02.541 JupyterHub log:191] 200 GET /hub/spawn-pending/cretin?_xsrf=[secret] (cretin@::ffff:10.0.0.2) 23.33ms
jupyter_jupyterhub.1.xyczlxc5gte4@www | 13:30:02.604 [ConfigProxy] debug: PROXY WEB /hub/api/users/cretin/server/progress to http://jupyterhub:8081
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:02.993 JupyterHub dockerspawner:1033] Service 'jupyter-cretin' is gone
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:03.018 JupyterHub dockerspawner:1311] Created service jupyter-cretin (id: vdyzqmk) from image dsimb/gpu-jupyter-v1.6_cuda-12.0_ubuntu-22.04:x86_64_v4
jupyter_jupyterhub.1.xyczlxc5gte4@www | [I 2024-03-08 13:30:03.018 JupyterHub dockerspawner:1335] Starting service jupyter-cretin (id: vdyzqmk)
jupyter_jupyterhub.1.xyczlxc5gte4@www | [W 2024-03-08 13:30:11.495 JupyterHub base:1090] User cretin is slow to start (timeout=10)
jupyter_jupyterhub.1.xyczlxc5gte4@www | [E 2024-03-08 13:31:18.989 JupyterHub user:884] Unhandled error starting cretin's server: Service jupyter-cretin not running: {'ContainerStatus': {'ContainerID': 'eb4014db8679c37efc4077620060641392d601223c81ed736e3ea2e47e6a580c',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'ExitCode': 1,
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PID': 0},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Err': 'task: non-zero exit (1): dockerexec: unhealthy container',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Message': 'starting',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PortStatus': {},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'State': 'failed',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Timestamp': '2024-03-08T13:31:20.899629619Z'}
jupyter_jupyterhub.1.xyczlxc5gte4@www | Traceback (most recent call last):
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py", line 798, in spawn
jupyter_jupyterhub.1.xyczlxc5gte4@www | url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/dockerspawner/dockerspawner.py", line 1343, in start
jupyter_jupyterhub.1.xyczlxc5gte4@www | await self.start_object()
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/dockerspawner/swarmspawner.py", line 298, in start_object
jupyter_jupyterhub.1.xyczlxc5gte4@www | raise RuntimeError(
jupyter_jupyterhub.1.xyczlxc5gte4@www | RuntimeError: Service jupyter-cretin not running: {'ContainerStatus': {'ContainerID': 'eb4014db8679c37efc4077620060641392d601223c81ed736e3ea2e47e6a580c',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'ExitCode': 1,
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PID': 0},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Err': 'task: non-zero exit (1): dockerexec: unhealthy container',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Message': 'starting',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PortStatus': {},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'State': 'failed',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Timestamp': '2024-03-08T13:31:20.899629619Z'}
jupyter_jupyterhub.1.xyczlxc5gte4@www |
jupyter_jupyterhub.1.xyczlxc5gte4@www | [E 2024-03-08 13:31:19.073 JupyterHub gen:630] Exception in Future <Task finished name='Task-34' coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py:981> exception=RuntimeError("Service jupyter-cretin not running: {'ContainerStatus': {'ContainerID': 'eb4014db8679c37efc4077620060641392d601223c81ed736e3ea2e47e6a580c',\n 'ExitCode': 1,\n 'PID': 0},\n 'Err': 'task: non-zero exit (1): dockerexec: unhealthy container',\n 'Message': 'starting',\n 'PortStatus': {},\n 'State': 'failed',\n 'Timestamp': '2024-03-08T13:31:20.899629619Z'}")> after timeout
jupyter_jupyterhub.1.xyczlxc5gte4@www | Traceback (most recent call last):
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/tornado/gen.py", line 625, in error_callback
jupyter_jupyterhub.1.xyczlxc5gte4@www | future.result()
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py", line 988, in finish_user_spawn
jupyter_jupyterhub.1.xyczlxc5gte4@www | await spawn_future
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py", line 902, in spawn
jupyter_jupyterhub.1.xyczlxc5gte4@www | raise e
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py", line 798, in spawn
jupyter_jupyterhub.1.xyczlxc5gte4@www | url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/dockerspawner/dockerspawner.py", line 1343, in start
jupyter_jupyterhub.1.xyczlxc5gte4@www | await self.start_object()
jupyter_jupyterhub.1.xyczlxc5gte4@www | File "/usr/local/lib/python3.10/dist-packages/dockerspawner/swarmspawner.py", line 298, in start_object
jupyter_jupyterhub.1.xyczlxc5gte4@www | raise RuntimeError(
jupyter_jupyterhub.1.xyczlxc5gte4@www | RuntimeError: Service jupyter-cretin not running: {'ContainerStatus': {'ContainerID': 'eb4014db8679c37efc4077620060641392d601223c81ed736e3ea2e47e6a580c',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'ExitCode': 1,
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PID': 0},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Err': 'task: non-zero exit (1): dockerexec: unhealthy container',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Message': 'starting',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'PortStatus': {},
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'State': 'failed',
jupyter_jupyterhub.1.xyczlxc5gte4@www | 'Timestamp': '2024-03-08T13:31:20.899629619Z'}
jupyter_jupyterhub.1.xyczlxc5gte4@www |