Jupyterhub 4.0.x with jupyter-collaboration

Hi,

Did anyone have success of using the latest Jupyterhub with jupyter-collaboration extension?

For some reason I get WebSocket errors when trying to use the server link with a token in a private browser window. This worked previously with Jupyterhub 3.1.1.

Here a quick test:

Dockerfile:

FROM jupyter/minimal-notebook:hub-4.0.2

RUN pip install --no-cache-dir \
   jupyterlab==4.0.5 \
   jupyter-collaboration

COPY jupyterhub_config.py /etc/jupyterhub/

CMD jupyterhub -f /etc/jupyterhub/jupyterhub_config.py

jupyterhub_config.py:

c.JupyterHub.authenticator_class = 'dummy'

Build and run:

docker build -t jupyterhub-collaboration .
docker run -it -p 8000:8000 jupyterhub-collaboration

Open http://localhost:8000 in browser and authenticate as jovyan

Click on the “share” symbol in the upper right corner (“Generate a Shared Link”).

Tick “Include token in URL”

Copy Link, something like:
http://localhost:8000/user/jovyan/lab?token=uCgCpORq8eGKLFqt6wYkoOfKcRKPft

Open a new private browser window (or a different browser) and paste this link.

Result: Jupyterlab gets loaded, but the notebooks could not be opened. There are some errors on the console.

See the screenshot:

I’ll post the log in a separate message (it is quite long).

With jupyterhub 3.1.1 everything seems to work fine.

Just change the first like in Dockerfile to:
FROM jupyter/minimal-notebook:hub-3.1.1

Screenshot:

Any ideas what could be causing the problem?

The log is too long, splitting on two messages:

Log part 1
% docker run -it -p 8000:8000 jupyterhub-collaboration
[I 2023-08-18 16:43:33.150 JupyterHub app:2859] Running JupyterHub version 4.0.2
[I 2023-08-18 16:43:33.150 JupyterHub app:2889] Using Authenticator: jupyterhub.auth.DummyAuthenticator-4.0.2
[I 2023-08-18 16:43:33.150 JupyterHub app:2889] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-4.0.2
[I 2023-08-18 16:43:33.150 JupyterHub app:2889] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.0.2
[I 2023-08-18 16:43:33.159 JupyterHub app:1709] Writing cookie_secret to /home/jovyan/jupyterhub_cookie_secret
[I 2023-08-18 16:43:33.176 alembic.runtime.migration migration:213] Context impl SQLiteImpl.
[I 2023-08-18 16:43:33.176 alembic.runtime.migration migration:216] Will assume non-transactional DDL.
[I 2023-08-18 16:43:33.183 alembic.runtime.migration migration:621] Running stamp_revision  -> 0eee8c825d24
[I 2023-08-18 16:43:33.308 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
[I 2023-08-18 16:43:33.324 JupyterHub app:1984] Not using allowed_users. Any authenticated user will be allowed.
[I 2023-08-18 16:43:33.333 JupyterHub app:2928] Initialized 0 spawners in 0.001 seconds
[I 2023-08-18 16:43:33.339 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2023-08-18 16:43:33.340 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.seven_days
[I 2023-08-18 16:43:33.340 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.thirty_days
[W 2023-08-18 16:43:33.341 JupyterHub proxy:746] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2023-08-18 16:43:33.341 JupyterHub proxy:750] Starting proxy @ http://:8000
16:43:33.581 [ConfigProxy] info: Proxying http://*:8000 to (no default)
16:43:33.583 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[I 2023-08-18 16:43:34.241 JupyterHub app:3178] Hub API listening on http://127.0.0.1:8081/hub/
16:43:34.242 [ConfigProxy] info: 200 GET /api/routes 
[I 2023-08-18 16:43:34.244 JupyterHub proxy:477] Adding route for Hub: / => http://127.0.0.1:8081
16:43:34.245 [ConfigProxy] info: 200 GET /api/routes 
16:43:34.246 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
16:43:34.247 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
[I 2023-08-18 16:43:34.248 JupyterHub app:3245] JupyterHub is now running at http://:8000
16:43:34.249 [ConfigProxy] info: 201 POST /api/routes/ 
[I 2023-08-18 16:43:34.268 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.70ms
[I 2023-08-18 16:43:34.276 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.94ms
[I 2023-08-18 16:43:34.314 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 32.19ms
[I 2023-08-18 16:43:34.935 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.41ms
[W 2023-08-18 16:43:34.940 JupyterHub base:415] Invalid or expired cookie token
[I 2023-08-18 16:43:34.941 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.78ms
[I 2023-08-18 16:43:34.948 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.70ms
[I 2023-08-18 16:43:36.018 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.35ms
[I 2023-08-18 16:43:36.023 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.33ms
[I 2023-08-18 16:43:36.027 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.94ms
[I 2023-08-18 16:43:36.950 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.32ms
[I 2023-08-18 16:43:36.954 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.35ms
[I 2023-08-18 16:43:36.970 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.93ms
[I 2023-08-18 16:43:37.512 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.44ms
[I 2023-08-18 16:43:37.519 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.91ms
[I 2023-08-18 16:43:37.525 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.88ms
[I 2023-08-18 16:43:38.599 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.34ms
[I 2023-08-18 16:43:38.603 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.29ms
[I 2023-08-18 16:43:38.611 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.90ms
[I 2023-08-18 16:43:39.588 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.73ms
[I 2023-08-18 16:43:39.596 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.65ms
[I 2023-08-18 16:43:39.604 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.20ms
[I 2023-08-18 16:43:40.147 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.41ms
[I 2023-08-18 16:43:40.152 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.28ms
[I 2023-08-18 16:43:40.162 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 2.12ms
[I 2023-08-18 16:43:41.213 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.33ms
[I 2023-08-18 16:43:41.218 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.28ms
[I 2023-08-18 16:43:41.223 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.29ms
[I 2023-08-18 16:43:42.170 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.30ms
[I 2023-08-18 16:43:42.174 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.45ms
[I 2023-08-18 16:43:42.182 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.02ms
[I 2023-08-18 16:43:42.764 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.36ms
[I 2023-08-18 16:43:42.770 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.34ms
[I 2023-08-18 16:43:42.775 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.21ms
[I 2023-08-18 16:43:43.801 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.99ms
[I 2023-08-18 16:43:43.805 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.39ms
[I 2023-08-18 16:43:43.813 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 2.00ms
[I 2023-08-18 16:43:44.794 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.37ms
[I 2023-08-18 16:43:44.797 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.27ms
[I 2023-08-18 16:43:44.800 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.91ms
[I 2023-08-18 16:43:45.342 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.63ms
[I 2023-08-18 16:43:45.348 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.37ms
[I 2023-08-18 16:43:45.353 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.16ms
[I 2023-08-18 16:43:45.888 JupyterHub log:191] 302 GET / -> /hub/ (@::ffff:172.17.0.1) 0.40ms
[I 2023-08-18 16:43:45.901 JupyterHub log:191] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@::ffff:172.17.0.1) 0.56ms
[I 2023-08-18 16:43:45.910 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2F (@::ffff:172.17.0.1) 0.99ms
[I 2023-08-18 16:43:45.987 JupyterHub log:191] 302 GET /user/jovyan/api/events/subscribe?token=[secret] -> /hub/user/jovyan/api/events/subscribe?token=[secret] (@::ffff:172.17.0.1) 0.67ms
[I 2023-08-18 16:43:46.016 JupyterHub log:191] 302 GET /hub/user/jovyan/api/events/subscribe?token=[secret] -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fevents%2Fsubscribe%3Ftoken%3DuCgCpORq8eGKLFqt6wYkoOfKcRKPft (@::ffff:172.17.0.1) 0.67ms
[I 2023-08-18 16:43:46.023 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fevents%2Fsubscribe%3Ftoken%3DuCgCpORq8eGKLFqt6wYkoOfKcRKPft (@::ffff:172.17.0.1) 2.54ms
[I 2023-08-18 16:43:46.467 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.36ms
[I 2023-08-18 16:43:46.470 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.30ms
[I 2023-08-18 16:43:46.473 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.07ms
[I 2023-08-18 16:43:47.348 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.43ms
[I 2023-08-18 16:43:47.353 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.26ms
[I 2023-08-18 16:43:47.358 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.96ms
[I 2023-08-18 16:43:47.949 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.56ms
[I 2023-08-18 16:43:47.953 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.38ms
[I 2023-08-18 16:43:47.959 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.61ms
[I 2023-08-18 16:43:49.109 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.46ms
[I 2023-08-18 16:43:49.114 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.44ms
[I 2023-08-18 16:43:49.146 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 1.35ms
[I 2023-08-18 16:43:49.982 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.83ms
[I 2023-08-18 16:43:49.987 JupyterHub log:191] 302 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 0.43ms
[I 2023-08-18 16:43:49.996 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fjovyan%2Fapi%2Fcollaboration%2Froom%2FJupyterLab%3AglobalAwareness (@::ffff:172.17.0.1) 2.10ms
[I 2023-08-18 16:43:50.136 JupyterHub roles:238] Adding role user for User: jovyan
[I 2023-08-18 16:43:50.163 JupyterHub base:837] User logged in: jovyan
[I 2023-08-18 16:43:50.166 JupyterHub log:191] 302 POST /hub/login?next=%2Fhub%2F -> /hub/ (jovyan@::ffff:172.17.0.1) 55.75ms
[I 2023-08-18 16:43:50.206 JupyterHub log:191] 302 GET /hub/ -> /hub/spawn (jovyan@::ffff:172.17.0.1) 21.60ms
[I 2023-08-18 16:43:50.240 JupyterHub provider:659] Creating oauth client jupyterhub-user-jovyan
[I 2023-08-18 16:43:50.255 JupyterHub spawner:1689] Spawning jupyterhub-singleuser
Failed to set groups [Errno 1] Operation not permitted
[I 2023-08-18 16:43:50.535 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.48ms
[W 2023-08-18 16:43:50.542 JupyterHub base:1444] Failing suspected API request to not-running server: /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness
[W 2023-08-18 16:43:50.544 JupyterHub log:191] 424 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (jovyan@::ffff:172.17.0.1) 4.05ms
[I 2023-08-18 16:43:51.001 ServerApp] Package jupyterhub took 0.0000s to import
[I 2023-08-18 16:43:51.023 ServerApp] Package jupyter_collaboration took 0.0211s to import
[I 2023-08-18 16:43:51.033 ServerApp] Package jupyter_lsp took 0.0095s to import
[W 2023-08-18 16:43:51.033 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-18 16:43:51.033 ServerApp] Package jupyter_server_fileid took 0.0000s to import
[I 2023-08-18 16:43:51.037 ServerApp] Package jupyter_server_terminals took 0.0040s to import
[I 2023-08-18 16:43:51.079 ServerApp] Package jupyterlab took 0.0416s to import
[I 2023-08-18 16:43:51.227 JupyterHub log:191] 302 GET /hub/spawn -> /hub/spawn-pending/jovyan (jovyan@::ffff:172.17.0.1) 1009.95ms
[I 2023-08-18 16:43:51.241 JupyterHub pages:398] jovyan is pending spawn
[I 2023-08-18 16:43:51.250 JupyterHub log:191] 200 GET /hub/spawn-pending/jovyan (jovyan@::ffff:172.17.0.1) 11.48ms
[I 2023-08-18 16:43:51.592 ServerApp] Package nbclassic took 0.0016s to import
[W 2023-08-18 16:43:51.593 ServerApp] A `_jupyter_server_extension_points` function was not found in nbclassic. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-18 16:43:51.593 ServerApp] Package notebook took 0.0000s to import
[I 2023-08-18 16:43:51.595 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-08-18 16:43:51.595 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-18 16:43:51.597 ServerApp] jupyter_collaboration | extension was successfully linked.
[I 2023-08-18 16:43:51.597 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-08-18 16:43:51.600 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2023-08-18 16:43:51.602 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-08-18 16:43:51.602 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 4.0.2
[I 2023-08-18 16:43:51.602 JupyterHubSingleUser] Using default url from server extension lab: /lab
[I 2023-08-18 16:43:51.603 ServerApp] jupyterhub | extension was successfully linked.
[W 2023-08-18 16:43:51.604 LabApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2023-08-18 16:43:51.606 ServerApp] jupyterlab | extension was successfully linked.
[W 2023-08-18 16:43:51.607 NotebookApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2023-08-18 16:43:51.608 ServerApp] nbclassic | extension was successfully linked.
[W 2023-08-18 16:43:51.609 JupyterNotebookApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2023-08-18 16:43:51.610 ServerApp] notebook | extension was successfully linked.
[I 2023-08-18 16:43:51.611 ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-08-18 16:43:51.713 JupyterHub log:191] 302 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness -> /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 0.58ms
[W 2023-08-18 16:43:51.722 JupyterHub base:1444] Failing suspected API request to not-running server: /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness
[W 2023-08-18 16:43:51.722 JupyterHub log:191] 424 GET /hub/user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (jovyan@::ffff:172.17.0.1) 2.32ms
[I 2023-08-18 16:43:51.764 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-08-18 16:43:51.776 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-08-18 16:43:51.777 ServerApp] jupyter_collaboration | extension was successfully loaded.
[I 2023-08-18 16:43:51.778 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-08-18 16:43:51.778 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2023-08-18 16:43:51.779 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /home/jovyan
[I 2023-08-18 16:43:51.779 FileIdExtension] ArbitraryFileIdManager : Configured database path: /home/jovyan/.local/share/jupyter/file_id_manager.db
[I 2023-08-18 16:43:51.779 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2023-08-18 16:43:51.779 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2023-08-18 16:43:51.784 FileIdExtension] Attached event listeners.
[I 2023-08-18 16:43:51.784 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2023-08-18 16:43:51.785 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-18 16:43:51.792 JupyterHub log:191] 200 GET /hub/api (@127.0.0.1) 0.38ms
[I 2023-08-18 16:43:51.793 JupyterHubSingleUser] Updating Hub with activity every 300 seconds
[I 2023-08-18 16:43:51.794 ServerApp] jupyterhub | extension was successfully loaded.
[I 2023-08-18 16:43:51.800 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.11/site-packages/jupyterlab
[I 2023-08-18 16:43:51.801 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 2023-08-18 16:43:51.801 LabApp] Extension Manager is 'pypi'.
[I 2023-08-18 16:43:51.802 ServerApp] jupyterlab | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|
                                                                           
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-08-18 16:43:51.805 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-08-18 16:43:51.806 ServerApp] notebook | extension was successfully loaded.
[I 2023-08-18 16:43:51.806 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2023-08-18 16:43:51.806 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-08-18 16:43:51.806 ServerApp] http://127.0.0.1:46109/user/jovyan/lab?token=...
[I 2023-08-18 16:43:51.806 ServerApp]     http://127.0.0.1:46109/user/jovyan/lab?token=...
[I 2023-08-18 16:43:51.806 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Log part 2
[I 2023-08-18 16:43:51.820 JupyterHub log:191] 200 POST /hub/api/users/jovyan/activity (jovyan@127.0.0.1) 9.53ms
[I 2023-08-18 16:43:51.828 ServerApp] 302 GET /user/jovyan/ -> /user/jovyan/lab? (@127.0.0.1) 0.36ms
[W 2023-08-18 16:43:51.828 JupyterHub _version:37] Single-user server has no version header, which means it is likely < 0.8. Expected 4.0.2
[I 2023-08-18 16:43:51.828 JupyterHub base:990] User jovyan took 1.609 seconds to start
[I 2023-08-18 16:43:51.829 JupyterHub proxy:330] Adding user jovyan to proxy /user/jovyan/ => http://127.0.0.1:46109
16:43:51.830 [ConfigProxy] info: Adding route /user/jovyan -> http://127.0.0.1:46109
16:43:51.830 [ConfigProxy] info: Route added /user/jovyan -> http://127.0.0.1:46109
16:43:51.831 [ConfigProxy] info: 201 POST /api/routes/user/jovyan 
[I 2023-08-18 16:43:51.831 JupyterHub users:768] Server jovyan is ready
[I 2023-08-18 16:43:51.832 JupyterHub log:191] 200 GET /hub/api/users/jovyan/server/progress?_xsrf=[secret] (jovyan@::ffff:172.17.0.1) 484.76ms
[I 2023-08-18 16:43:51.845 JupyterHub log:191] 302 GET /hub/spawn-pending/jovyan -> /user/jovyan/ (jovyan@::ffff:172.17.0.1) 2.46ms
[I 2023-08-18 16:43:51.853 ServerApp] 302 GET /user/jovyan/ -> /user/jovyan/lab? (@::ffff:172.17.0.1) 0.35ms
[I 2023-08-18 16:43:51.862 ServerApp] 302 GET /user/jovyan/lab? -> /hub/api/oauth2/authorize?client_id=jupyterhub-user-jovyan&redirect_uri=%2Fuser%2Fjovyan%2Foauth_callback&response_type=code&state=[secret] (@::ffff:172.17.0.1) 0.94ms
[I 2023-08-18 16:43:51.883 JupyterHub log:191] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-jovyan&redirect_uri=%2Fuser%2Fjovyan%2Foauth_callback&response_type=code&state=[secret] -> /user/jovyan/oauth_callback?code=[secret]&state=[secret] (jovyan@::ffff:172.17.0.1) 12.75ms
[I 2023-08-18 16:43:51.902 JupyterHub log:191] 200 POST /hub/api/oauth2/token (jovyan@127.0.0.1) 12.61ms
[I 2023-08-18 16:43:51.908 ServerApp] Logged-in user {'kind': 'user', 'name': 'jovyan', 'groups': [], 'admin': False, 'session_id': '8ba887930a0f494d986933e89d696532', 'scopes': ['access:servers!server=jovyan/', 'read:users:groups!user=jovyan', 'read:users:name!user=jovyan']}
[I 2023-08-18 16:43:51.911 JupyterHub log:191] 200 GET /hub/api/user (jovyan@127.0.0.1) 8.61ms
[I 2023-08-18 16:43:51.912 ServerApp] 302 GET /user/jovyan/oauth_callback?code=[secret]&state=[secret] -> /user/jovyan/lab? (@::ffff:172.17.0.1) 20.12ms
[I 2023-08-18 16:43:51.923 ServerApp] 200 GET /user/jovyan/lab? (jovyan@::ffff:172.17.0.1) 6.69ms
[I 2023-08-18 16:43:52.359 ServerApp] 200 GET /user/jovyan/api/me?1692377032309 (jovyan@::ffff:172.17.0.1) 35.65ms
[I 2023-08-18 16:43:52.459 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2023-08-18 16:43:52.571 ServerApp] 200 GET /user/jovyan/api/kernelspecs?1692377032304 (jovyan@::ffff:172.17.0.1) 205.06ms
[I 2023-08-18 16:43:52.631 ServerApp] 200 GET /user/jovyan/lab/api/settings?1692377032315 (jovyan@::ffff:172.17.0.1) 57.90ms
[I 2023-08-18 16:43:52.632 ServerApp] 101 GET /user/jovyan/api/events/subscribe?token=[secret] (jovyan@::ffff:172.17.0.1) 57.25ms
[I 2023-08-18 16:43:52.637 ServerApp] 200 GET /user/jovyan/api/sessions?1692377032323 (jovyan@::ffff:172.17.0.1) 61.28ms
[I 2023-08-18 16:43:52.638 ServerApp] 200 GET /user/jovyan/api/kernels?1692377032323 (jovyan@::ffff:172.17.0.1) 61.84ms
[I 2023-08-18 16:43:52.639 ServerApp] 200 GET /user/jovyan/api/terminals?1692377032324 (jovyan@::ffff:172.17.0.1) 61.95ms
[I 2023-08-18 16:43:52.644 ServerApp] 200 GET /user/jovyan/lab/workspaces/auto-o?reset (jovyan@::ffff:172.17.0.1) 67.25ms
[W 2023-08-18 16:43:52.656 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:43:52.666 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 20.83ms
[I 2023-08-18 16:43:52.918 ServerApp] 200 GET /user/jovyan/api/me?1692377032903 (jovyan@::ffff:172.17.0.1) 0.76ms
[I 2023-08-18 16:43:52.925 ServerApp] 200 GET /user/jovyan/api/kernelspecs?1692377032903 (jovyan@::ffff:172.17.0.1) 5.22ms
[I 2023-08-18 16:43:53.000 ServerApp] 200 GET /user/jovyan/lab/api/settings?1692377032906 (jovyan@::ffff:172.17.0.1) 80.74ms
[I 2023-08-18 16:43:53.003 ServerApp] 101 GET /user/jovyan/api/events/subscribe?token=[secret] (jovyan@::ffff:172.17.0.1) 1.99ms
[I 2023-08-18 16:43:53.004 ServerApp] 200 GET /user/jovyan/api/terminals?1692377032912 (jovyan@::ffff:172.17.0.1) 2.27ms
[I 2023-08-18 16:43:53.004 ServerApp] 200 GET /user/jovyan/api/kernels?1692377032911 (jovyan@::ffff:172.17.0.1) 2.35ms
[I 2023-08-18 16:43:53.006 ServerApp] 200 GET /user/jovyan/api/sessions?1692377032912 (jovyan@::ffff:172.17.0.1) 3.35ms
[I 2023-08-18 16:43:53.006 ServerApp] 200 GET /user/jovyan/api/me?1692377032925 (jovyan@::ffff:172.17.0.1) 3.91ms
[I 2023-08-18 16:43:53.008 ServerApp] 200 GET /user/jovyan/api/kernelspecs?1692377032931 (jovyan@::ffff:172.17.0.1) 5.03ms
[I 2023-08-18 16:43:53.117 ServerApp] 101 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (jovyan@::ffff:172.17.0.1) 0.62ms
message type: 0
message type: 1
message type: 0
[I 2023-08-18 16:43:53.267 ServerApp] 200 GET /user/jovyan/api (@127.0.0.1) 0.83ms
[I 2023-08-18 16:43:54.098 ServerApp] 200 GET /user/jovyan/lab/api/translations/default?1692377034048 (jovyan@::ffff:172.17.0.1) 39.19ms
[I 2023-08-18 16:43:54.113 ServerApp] 200 GET /user/jovyan/api/config/jupyterlabapputilsextensionannouncements?1692377034105 (jovyan@::ffff:172.17.0.1) 2.11ms
[I 2023-08-18 16:43:54.136 ServerApp] 101 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (jovyan@::ffff:172.17.0.1) 2.34ms
message type: 1
[I 2023-08-18 16:43:54.197 ServerApp] 200 GET /user/jovyan/lsp/status?1692377034186 (jovyan@::ffff:172.17.0.1) 3.11ms
[I 2023-08-18 16:43:54.270 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377034219 (jovyan@::ffff:172.17.0.1) 34.60ms
message type: 0
message type: 1
message type: 0
[I 2023-08-18 16:43:54.314 ServerApp] 200 GET /user/jovyan/lab/api/translations?1692377034212 (jovyan@::ffff:172.17.0.1) 95.92ms
[I 2023-08-18 16:43:54.320 ServerApp] 101 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (jovyan@::ffff:172.17.0.1) 0.52ms
message type: 0
message type: 1
message type: 0
[I 2023-08-18 16:43:54.367 ServerApp] 200 GET /user/jovyan/lab/api/settings?ids_only=true&1692377034355 (jovyan@::ffff:172.17.0.1) 7.21ms
[I 2023-08-18 16:43:54.468 ServerApp] 200 GET /user/jovyan/lab/api/settings/@jupyterlab/notebook-extension:panel?1692377034416 (jovyan@::ffff:172.17.0.1) 36.35ms
[I 2023-08-18 16:43:54.479 ServerApp] 200 GET /user/jovyan/lab/api/settings/@jupyterlab/codemirror-extension:plugin?1692377034415 (jovyan@::ffff:172.17.0.1) 39.95ms
message type: 1
message type: 1
message type: 1
[I 2023-08-18 16:43:54.501 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377034448 (jovyan@::ffff:172.17.0.1) 13.97ms
message type: 1
message type: 1
message type: 1
[I 2023-08-18 16:43:54.664 LabApp] Build is up to date
[I 2023-08-18 16:43:54.665 ServerApp] 200 GET /user/jovyan/lab/api/build?1692377034128 (jovyan@::ffff:172.17.0.1) 522.27ms
[I 2023-08-18 16:43:55.034 ServerApp] 204 PUT /user/jovyan/lab/api/workspaces/auto-o?1692377035022 (jovyan@::ffff:172.17.0.1) 3.08ms
[I 2023-08-18 16:43:55.073 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377035047 (jovyan@::ffff:172.17.0.1) 6.99ms
message type: 1
message type: 1
message type: 1
[W 2023-08-18 16:43:55.302 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:43:55.303 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.89ms
[I 2023-08-18 16:43:55.642 ServerApp] 204 PUT /user/jovyan/lab/api/workspaces/auto-o?1692377035634 (jovyan@::ffff:172.17.0.1) 0.96ms
[W 2023-08-18 16:43:57.857 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:43:57.858 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.63ms
[I 2023-08-18 16:43:58.439 ServerApp] 200 GET /user/jovyan/api (@127.0.0.1) 0.50ms
[W 2023-08-18 16:44:00.479 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:00.487 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 10.34ms
[I 2023-08-18 16:44:02.613 JupyterHub log:191] 302 GET /apple-touch-icon-precomposed.png -> /hub/apple-touch-icon-precomposed.png (@::ffff:172.17.0.1) 3.30ms
[I 2023-08-18 16:44:02.616 JupyterHub log:191] 302 GET /apple-touch-icon.png -> /hub/apple-touch-icon.png (@::ffff:172.17.0.1) 0.37ms
[W 2023-08-18 16:44:02.669 JupyterHub log:191] 404 GET /hub/apple-touch-icon-precomposed.png (@::ffff:172.17.0.1) 17.40ms
[W 2023-08-18 16:44:02.670 JupyterHub log:191] 404 GET /hub/apple-touch-icon.png (@::ffff:172.17.0.1) 18.00ms
[W 2023-08-18 16:44:03.047 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:03.053 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 6.91ms
[I 2023-08-18 16:44:03.122 ServerApp] 200 GET /user/jovyan/api/terminals?1692377043105 (jovyan@::ffff:172.17.0.1) 4.05ms
[I 2023-08-18 16:44:03.128 ServerApp] 200 GET /user/jovyan/api/kernels?1692377043106 (jovyan@::ffff:172.17.0.1) 1.49ms
[I 2023-08-18 16:44:03.130 ServerApp] 200 GET /user/jovyan/api/sessions?1692377043106 (jovyan@::ffff:172.17.0.1) 1.28ms
[I 2023-08-18 16:44:03.589 ServerApp] 200 GET /user/jovyan/api (@127.0.0.1) 0.35ms
[I 2023-08-18 16:44:04.562 JupyterHub log:191] 302 GET /apple-touch-icon-precomposed.png -> /hub/apple-touch-icon-precomposed.png (@::ffff:172.17.0.1) 0.41ms
[I 2023-08-18 16:44:04.563 JupyterHub log:191] 302 GET /apple-touch-icon.png -> /hub/apple-touch-icon.png (@::ffff:172.17.0.1) 0.27ms
[W 2023-08-18 16:44:04.716 JupyterHub log:191] 404 GET /hub/apple-touch-icon.png (@::ffff:172.17.0.1) 6.78ms
[W 2023-08-18 16:44:04.717 JupyterHub log:191] 404 GET /hub/apple-touch-icon-precomposed.png (@::ffff:172.17.0.1) 5.71ms
[I 2023-08-18 16:44:05.109 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377045079 (jovyan@::ffff:172.17.0.1) 21.64ms
[W 2023-08-18 16:44:05.692 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:05.696 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 7.50ms
message type: 1
message type: 1
message type: 1
[I 2023-08-18 16:44:07.058 JupyterHub log:191] 200 GET /hub/api/user (jovyan@127.0.0.1) 10.29ms
[I 2023-08-18 16:44:07.062 ServerApp] 200 GET /user/jovyan/lab?token=[secret] (jovyan@::ffff:172.17.0.1) 21.36ms
[I 2023-08-18 16:44:07.363 ServerApp] 200 GET /user/jovyan/api/kernelspecs?1692377047357 (jovyan@::ffff:172.17.0.1) 1.11ms
[I 2023-08-18 16:44:07.365 ServerApp] 200 GET /user/jovyan/api/me?1692377047359 (jovyan@::ffff:172.17.0.1) 1.02ms
[I 2023-08-18 16:44:07.403 ServerApp] 200 GET /user/jovyan/lab/api/settings?1692377047363 (jovyan@::ffff:172.17.0.1) 36.03ms
[I 2023-08-18 16:44:07.407 ServerApp] 101 GET /user/jovyan/api/events/subscribe?token=[secret] (jovyan@::ffff:172.17.0.1) 2.30ms
[I 2023-08-18 16:44:07.408 ServerApp] 200 GET /user/jovyan/api/kernels?1692377047368 (jovyan@::ffff:172.17.0.1) 2.65ms
[I 2023-08-18 16:44:07.408 ServerApp] 200 GET /user/jovyan/api/terminals?1692377047369 (jovyan@::ffff:172.17.0.1) 2.93ms
[I 2023-08-18 16:44:07.409 ServerApp] 200 GET /user/jovyan/api/sessions?1692377047369 (jovyan@::ffff:172.17.0.1) 2.85ms
[I 2023-08-18 16:44:07.410 ServerApp] 200 GET /user/jovyan/api/kernelspecs?1692377047370 (jovyan@::ffff:172.17.0.1) 3.78ms
[I 2023-08-18 16:44:07.413 ServerApp] 200 GET /user/jovyan/api/me?1692377047370 (jovyan@::ffff:172.17.0.1) 6.39ms
[W 2023-08-18 16:44:08.326 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:08.328 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 2.77ms
[I 2023-08-18 16:44:08.492 ServerApp] 200 GET /user/jovyan/lab/api/translations/default?1692377048450 (jovyan@::ffff:172.17.0.1) 28.25ms
[I 2023-08-18 16:44:08.524 ServerApp] 200 GET /user/jovyan/api/config/jupyterlabapputilsextensionannouncements?1692377048518 (jovyan@::ffff:172.17.0.1) 1.75ms
[W 2023-08-18 16:44:08.541 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:08.542 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.20ms
[I 2023-08-18 16:44:08.596 ServerApp] 200 GET /user/jovyan/lsp/status?1692377048592 (jovyan@::ffff:172.17.0.1) 1.03ms
[I 2023-08-18 16:44:08.626 ServerApp] 200 GET /user/jovyan/lab/api/translations?1692377048611 (jovyan@::ffff:172.17.0.1) 9.77ms
[I 2023-08-18 16:44:08.632 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377048617 (jovyan@::ffff:172.17.0.1) 10.43ms
[I 2023-08-18 16:44:08.702 ServerApp] 200 GET /user/jovyan/lab/api/workspaces/default?1692377048698 (jovyan@::ffff:172.17.0.1) 0.76ms
[I 2023-08-18 16:44:08.723 ServerApp] 200 GET /user/jovyan/lab/api/settings/@jupyterlab/codemirror-extension:plugin?1692377048715 (jovyan@::ffff:172.17.0.1) 3.41ms
[I 2023-08-18 16:44:08.727 ServerApp] 200 GET /user/jovyan/lab/api/settings/@jupyterlab/notebook-extension:panel?1692377048715 (jovyan@::ffff:172.17.0.1) 6.02ms
[I 2023-08-18 16:44:08.735 ServerApp] 200 GET /user/jovyan/api (@127.0.0.1) 0.32ms
[I 2023-08-18 16:44:08.754 ServerApp] 200 GET /user/jovyan/lab/api/settings?ids_only=true&1692377048743 (jovyan@::ffff:172.17.0.1) 7.51ms
[I 2023-08-18 16:44:08.844 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377048831 (jovyan@::ffff:172.17.0.1) 8.11ms
[W 2023-08-18 16:44:08.886 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:08.887 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.68ms
[I 2023-08-18 16:44:08.917 LabApp] Build is up to date
[I 2023-08-18 16:44:08.918 ServerApp] 200 GET /user/jovyan/lab/api/build?1692377048538 (jovyan@::ffff:172.17.0.1) 375.34ms
[I 2023-08-18 16:44:09.384 ServerApp] 204 PUT /user/jovyan/lab/api/workspaces/default?1692377049365 (jovyan@::ffff:172.17.0.1) 4.43ms
[W 2023-08-18 16:44:09.420 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:09.421 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 1.61ms
[I 2023-08-18 16:44:09.428 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377049413 (jovyan@::ffff:172.17.0.1) 6.54ms
message type: 1
message type: 1
message type: 1
message type: 1
message type: 1
[I 2023-08-18 16:44:09.480 ServerApp] 302 GET /user/jovyan/kernelspecs/python3/logo-svg.svg -> /hub/api/oauth2/authorize?client_id=jupyterhub-user-jovyan&redirect_uri=%2Fuser%2Fjovyan%2Foauth_callback&response_type=code&state=[secret] (@::ffff:172.17.0.1) 1.41ms
[I 2023-08-18 16:44:09.499 JupyterHub log:191] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-jovyan&redirect_uri=%2Fuser%2Fjovyan%2Foauth_callback&response_type=code&state=[secret] -> /hub/login?next=%2Fhub%2Fapi%2Foauth2%2Fauthorize%3Fclient_id%3Djupyterhub-user-jovyan%26redirect_uri%3D%252Fuser%252Fjovyan%252Foauth_callback%26response_type%3Dcode%26state%3DeyJ1dWlkIjogIjlhMjg5MDE1NjI5MzRkNGFiMTRkM2FmYjIyZDA5YTEyIiwgIm5leHRfdXJsIjogIi91c2VyL2pvdnlhbi9rZXJuZWxzcGVjcy9weXRob24zL2xvZ28tc3ZnLnN2ZyJ9 (@::ffff:172.17.0.1) 0.60ms
[I 2023-08-18 16:44:09.504 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fapi%2Foauth2%2Fauthorize%3Fclient_id%3Djupyterhub-user-jovyan%26redirect_uri%3D%252Fuser%252Fjovyan%252Foauth_callback%26response_type%3Dcode%26state%3DeyJ1dWlkIjogIjlhMjg5MDE1NjI5MzRkNGFiMTRkM2FmYjIyZDA5YTEyIiwgIm5leHRfdXJsIjogIi91c2VyL2pvdnlhbi9rZXJuZWxzcGVjcy9weXRob24zL2xvZ28tc3ZnLnN2ZyJ9 (@::ffff:172.17.0.1) 1.46ms
[I 2023-08-18 16:44:09.980 ServerApp] 204 PUT /user/jovyan/lab/api/workspaces/default?1692377049963 (jovyan@::ffff:172.17.0.1) 1.98ms
[W 2023-08-18 16:44:10.269 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:10.274 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 5.62ms
[W 2023-08-18 16:44:10.859 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:10.862 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 4.33ms
[I 2023-08-18 16:44:11.728 ServerApp] 204 PUT /user/jovyan/lab/api/settings/@jupyterlab/apputils-extension:notification?1692377051706 (jovyan@::ffff:172.17.0.1) 12.05ms
[I 2023-08-18 16:44:11.738 ServerApp] 200 GET /user/jovyan/lab/api/settings/@jupyterlab/apputils-extension:notification?1692377051730 (jovyan@::ffff:172.17.0.1) 4.31ms
[W 2023-08-18 16:44:11.984 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:11.988 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 5.67ms
message type: 1
message type: 1
message type: 1
[I 2023-08-18 16:44:13.144 ServerApp] 200 GET /user/jovyan/api/terminals?1692377053126 (jovyan@::ffff:172.17.0.1) 4.66ms
[I 2023-08-18 16:44:13.157 ServerApp] 200 GET /user/jovyan/api/kernels?1692377053134 (jovyan@::ffff:172.17.0.1) 1.59ms
[I 2023-08-18 16:44:13.159 ServerApp] 200 GET /user/jovyan/api/sessions?1692377053135 (jovyan@::ffff:172.17.0.1) 2.31ms
[W 2023-08-18 16:44:13.439 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:13.443 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 5.20ms
[I 2023-08-18 16:44:13.919 ServerApp] 200 GET /user/jovyan/api (@127.0.0.1) 0.37ms
[W 2023-08-18 16:44:14.598 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:14.602 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 5.03ms
[I 2023-08-18 16:44:15.151 ServerApp] 200 GET /user/jovyan/api/contents?content=1&1692377055113 (jovyan@::ffff:172.17.0.1) 21.78ms
[W 2023-08-18 16:44:15.992 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:15.997 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 12.30ms
[W 2023-08-18 16:44:16.123 JupyterHub log:191] 403 GET /hub/api/user (@127.0.0.1) 5.62ms
[W 2023-08-18 16:44:16.125 ServerApp] No Hub user identified for request
[I 2023-08-18 16:44:16.127 ServerApp] 101 GET /user/jovyan/api/events/subscribe?token=[secret] (jovyan@::ffff:172.17.0.1) 15.03ms
[W 2023-08-18 16:44:17.164 ServerApp] Couldn't authenticate WebSocket connection
[W 2023-08-18 16:44:17.168 ServerApp] 403 GET /user/jovyan/api/collaboration/room/JupyterLab:globalAwareness (@::ffff:172.17.0.1) 6.69ms
[I 2023-08-18 16:44:17.520 ServerApp] 200 GET /user/jovyan/api/kernels?1692377057503 (jovyan@::ffff:172.17.0.1) 1.95ms
[I 2023-08-18 16:44:17.528 ServerApp] 200 GET /user/jovyan/api/sessions?1692377057505 (jovyan@::ffff:172.17.0.1) 2.15ms
[I 2023-08-18 16:44:17.536 ServerApp] 200 GET /user/jovyan/api/terminals?1692377057504 (jovyan@::ffff:172.17.0.1) 4.68ms
</details>

For working with JupyterHub, they way to grant access to a server is to share a link (exactly what’s in the URL, no token), and access should be granted via the access:servers scope, assigned via roles. Sharing access with a token discards credentials and allows spoofing (You’re sharing your credentials with a user, rather than granting access to another user).

I suspect the 4.x vs 3.x difference is in the change to being a jupyter-server extension (by default) instead of a subclass, and may relate to how JupyterLab picks the token to use here. If that’s the case, you can add JUPYTERHUB_SINGLEUSER_EXTENSION=0 to the single-user environment and see if it changes the behavior.

1 Like

Ran into this issue on a kubernetes cluster. However RTC worked on version 4.x for me for python3.7-3.9, but I got this websocket issue for python3.10-3.11.

Changing the singleuser extension settings causes another error on spawning a server: ImportError: No module named IPythonHandler
Things finally work for the python3.10-3.11 server when this is fixed by downgrading nbclassic.

RTC finally works after those two changes, but it’s very odd considering the only change is the python version in my servers

I suspect the changing Python version is resulting in different versions of other packages. You may check the diff of the output of pip list to compare the environments.

No module named IPythonHandler does suggest a package is out of date.

1 Like

Could you clarify what kind of spoofing is possible by sharing a token? Of curse, one gets full access to the server, the same as with the access:servers scope. Is there anything else the user can access? As far as I see the token only sets the cookie for the server. So the user should not get access to the hub or anything else.

Using a token is very convenient in situations when a user wants to quickly share access to his server with other (selected) users (our use case: a group of students working on the same assignment). Is there an easy way this can be achieved using the scopes?

This grants the user access to whatever the server can do, which can be modified both in the default server role ($JUPYTERHUB_API_TOKEN), and in the permissions of the oauth token used from the client (default server oauth_client_allowed_scopes). All of these permissions held by the ‘server owner’ will be granted to any user with the token.

The default permissions of these are extremely limited, and basically amounts to accessing the server itself (and notifying the Hub about activity on that server, but that’s minimal), but if you’ve elevated the server or client token’s permissions to enable extensions, etc. then you’re also elevating what permissions you are granting other users by sharing this token.

In practice, if you don’t elevate permissions then the only real cost of spoofing, assuming full execution access to the server is intended, is in the logs - all the requests made by other users will show up as being made by the original user and you won’t be able to tell if or when a different user is actually performing those operations.

Thanks for detailed clarifications @minrk!

Does it mean that the rules for the default token scope as documented here also apply for tokens issued by the jupyter-collaboration plugin? I was under impression that the lab tokens are not related to hub tokens since the jupyter-collaboration plugin can work even without the hub. Perhaps the warning message should be rephrased to make it clear that the issued token inherits all permissions of the user in the hub, in particular, access to other user servers.

Just to make it clear with a concrete example, lets say I use this config from the documentation. B.t.w., it does not seem to work for the latest jupyterhub as capital letters are not permitted in group names. Also the group members should be now written under the ‘users’ key. So I modified this example accordingly:

c.JupyterHub.load_groups = {
    'class-a': {'users': ['johan', 'student1', 'student2']},
    'class-b': {'users': ['student3', 'student4']},
}

c.JupyterHub.load_roles = [
    {
      'name': 'class-a-student',
      'description': 'Grants access to information about the group',
      'scopes': ['read:groups!group=class-a'],
      'groups': ['class-a']
    },
    {
      'name': 'class-b-student',
      'description': 'Grants access to information about the group',
      'scopes': ['read:groups!group=class-b'],
      'groups': ['class-b']
    },
    {
      'name': 'teacher',
      'description': 'Allows for accessing information about teacher group members and starting/stopping their servers',
      'scopes': [ 'read:users!group=class-b', 'servers!group=class-b'],
      'users': ['johan']
    }
]

Does it mean that the token created in the share link for the user johan should allow listing the members of groups class-a and class-b? This did not seem to work for me:

curl -X GET -H "Authorization: token MbyR3LoozIX3GKjPwLDaPSOFc05NcO" "http://127.0.0.1:8000/hub/api/groups/class-a"
{"status": 403, "message": "Action is not authorized with current scopes; requires any of [read:groups, read:groups:name, read:roles:groups]"}% 

Whereas, if I use the token created through the hub interface, I can list the members:

curl -X GET -H "Authorization: token 1a400aa4715d461592162b592657498c" "http://127.0.0.1:8000/hub/api/groups/class-a"
{"properties": {}, "kind": "group", "name": "class-a", "users": ["johan", "student1", "student2"]}%

Strangely, trying to list the members of the class-b with the same token results in a 404 error, which seems like a bug to me:

curl -X GET -H "Authorization: token 1a400aa4715d461592162b592657498c" "http://127.0.0.1:8000/hub/api/groups/class-b"
{"status": 404, "message": "No access to resources or resources not found"}% 

If I use a token with admin permissions, this works without problems:

curl -X GET -H "Authorization: token fa4cbcba43613c0246f00db62176b6e66419162b7e5896bf00834bd6f58372cc" "http://127.0.0.1:8000/hub/api/groups/class-b"
{"properties": {}, "roles": ["class-b-student"], "name": "class-b", "users": ["student3", "student4"], "kind": "group"}%  

The admin token was added using a service as follows:

c.JupyterHub.services = [
    {  
        "name": "service-token",
        "admin": True,
        "api_token": "fa4cbcba43613c0246f00db62176b6e66419162b7e5896bf00834bd6f58372cc",
    },
]

The hub version is: 4.0.2 (from same docker image as above).

Well, that should be clear since sharing a link with the token does not require another user to be even logged in to the hub (or, let alone, have an account on the hub). This does not seem like a big issue to me. Of course, one can distinguish users by ip addresses, if necessary.

I don’t think jupyter-collaboration issues tokens. I think it exposes the existing token.

Does it mean that the token created in the share link for the user johan should allow listing the members of groups class-a and class-b ?

No, because in the example you’ve granted users specific permissions to users, but you have not extended those permissions to the tokens issued to their servers. In order to pass these permissions into the single-user server session, you need to also set either the server role to govern the permissions of the server tokens, or Spawner.oauth_client_allowed_scopes to govern the scopes requested by the oauth tokens (i.e. the subset of a user’s total permissions that they have when talking to the single-user server). The most permissive form of this is passing the inherit scope, which means “this token can do everything I can do”.

trying to list the members of the class-b with the same token results in a 404 error, which seems like a bug to me

It’s a 404 instead of 403 to avoid leaking the existence of groups to unauthorized requests. This is the same error you get for e.g. unauthorized access of a private repo on GitHub.

I see. So I tried this:

c.JupyterHub.load_roles = [
   {
      'name': 'server',
      'scopes': ['users:activity!user', 'read:groups!group=class-a'],
    }
]

Still, could not read the members of the class-a using the token from the shared link:

% curl -X GET -H "Authorization: token l0j5E1StXJK7bpiiiT6LBi2gt4WUBQ" "http://127.0.0.1:8000/hub/api/groups/class-a"
{"status": 403, "message": "Action is not authorized with current scopes; requires any of [read:groups, read:groups:name, read:roles:groups]"}%

OK, I tried this:

c.Spawner.oauth_client_allowed_scopes = ['read:groups!group=class-a']

With this setting, indeed, I was able to list the class-a members:

% curl -X GET -H "Authorization: token gISLNRvPWSfpzWJ0CGtQIpEQMbjVaz" "http://127.0.0.1:8000/hub/api/groups/class-a"
{"name": "class-a", "properties": {}, "kind": "group", "users": ["johan", "student1", "student2"]}%

Indeed, this could be a problem with sharing a server token. However, since this setting is rather exotic, I wonder, is it possible to check programmatically if the server token has any permission except for accessing the server and, perhaps, warn the user sharing the link about such permissions only if that is the case?

I thought that johan should be able to list the members of class-b due to the teacher role?

You can always check what permissions a token has by hitting the /hub/api/user endpoint, which includes the scopes held by the request credentials in the response model (i.e. they show the request token’s scopes, not the owner’s scopes).

read:groups!group=class-b is needed to read group membership. teacher has only read:users!group=class-b, which means they have permission to read user models for users in the group, but not listing users in the group(s) or reading the group model for its members.