Hi JupyterHub community,
I am trying to deploy JupyterHub with DockerSpawner to a fresh Ubuntu 22 LTS VM, however I am running into problems.
Can someone give me a pointer to how I may debug this? Should I file an issue with the jupyterhub Github repo, or might it be an issue with my administration?
Expected Behavior: After installation, I can signup and login with the admin account
Actual Behavior: When logging in, I get a 302 redirect back to the login screen and no JupyterLab environment is created using DockerSpawner.
Steps taken:
1. Create a fresh Ubuntu 22 LTS VM on Digital Ocean and login
ssh xxx.xxx.xxx.xxx
2. Run install-docker.sh
#!/bin/bash
# Instructions from https://docs.docker.com/engine/install/ubuntu/
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose
3. Clone the official jupyterhub-deploy-docker
repo
git clone https://github.com/jupyterhub/jupyterhub-deploy-docker.git
4. Build and run the Docker image per the README.md
cd jupyterhub-deploy-docker/basic-example
docker-compose build
docker-compose up
5. Navigate to JupyterHub in my web browser and attempt the signup + login workflow
First, I navigate to the JupyterHub server. Next, I click “sign up”. I sign up with either username/password of admin/password or toby/password. Then, I go back to the login screen. Next, I login with one of the username/password combos. Finally, I get redirected straight back to the login screen with a 302 HTTP response.
So, I cannot get to JupyterLab
The content of the JupyterHub Docker container logs from startup to redirect are below:
root@indieagi-jupyterhub-droplet:~/jupyterhub-deploy-docker/basic-example# docker-compose up
Creating network "jupyterhub-network" with the default driver
Creating volume "basic-example_jupyterhub-data" with default driver
Creating jupyterhub ... done
Attaching to jupyterhub
jupyterhub | [I 2023-08-24 23:53:27.988 JupyterHub app:2859] Running JupyterHub version 4.0.2
jupyterhub | [I 2023-08-24 23:53:27.989 JupyterHub app:2889] Using Authenticator: nativeauthenticator.nativeauthenticator.NativeAuthenticator
jupyterhub | [I 2023-08-24 23:53:27.989 JupyterHub app:2889] Using Spawner: dockerspawner.dockerspawner.DockerSpawner-12.1.0
jupyterhub | [I 2023-08-24 23:53:27.989 JupyterHub app:2889] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.0.2
jupyterhub | [I 2023-08-24 23:53:28.005 JupyterHub app:1709] Writing cookie_secret to /data/jupyterhub_cookie_secret
jupyterhub | [I 2023-08-24 23:53:28.048 alembic.runtime.migration migration:213] Context impl SQLiteImpl.
jupyterhub | [I 2023-08-24 23:53:28.048 alembic.runtime.migration migration:216] Will assume non-transactional DDL.
jupyterhub | [I 2023-08-24 23:53:28.063 alembic.runtime.migration migration:621] Running stamp_revision -> 0eee8c825d24
jupyterhub | [I 2023-08-24 23:53:28.330 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
jupyterhub | [W 2023-08-24 23:53:28.366 JupyterHub auth:37]
jupyterhub | The shared database session at Authenticator.db is deprecated, and will be removed.
jupyterhub | Please manage your own database and connections.
jupyterhub |
jupyterhub | Contact JupyterHub at https://github.com/jupyterhub/jupyterhub/issues/3700
jupyterhub | if you have questions or ideas about direct database needs for your Authenticator.
jupyterhub |
jupyterhub | [I 2023-08-24 23:53:28.377 JupyterHub roles:238] Adding role admin for User: admin
jupyterhub | [I 2023-08-24 23:53:28.386 JupyterHub roles:238] Adding role user for User: admin
jupyterhub | [I 2023-08-24 23:53:28.392 JupyterHub app:1984] Not using allowed_users. Any authenticated user will be allowed.
jupyterhub | [I 2023-08-24 23:53:28.420 JupyterHub app:2928] Initialized 0 spawners in 0.003 seconds
jupyterhub | [I 2023-08-24 23:53:28.427 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
jupyterhub | [I 2023-08-24 23:53:28.429 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.seven_days
jupyterhub | [I 2023-08-24 23:53:28.430 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.thirty_days
jupyterhub | [W 2023-08-24 23:53:28.430 JupyterHub proxy:746] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
jupyterhub | [I 2023-08-24 23:53:28.430 JupyterHub proxy:750] Starting proxy @ http://:8000
jupyterhub | 23:53:28.731 [ConfigProxy] info: Proxying http://*:8000 to (no default)
jupyterhub | 23:53:28.735 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
jupyterhub | 23:53:28.902 [ConfigProxy] info: 200 GET /api/routes
jupyterhub | [I 2023-08-24 23:53:28.903 JupyterHub app:3178] Hub API listening on http://jupyterhub:8080/hub/
jupyterhub | 23:53:28.905 [ConfigProxy] info: 200 GET /api/routes
jupyterhub | [I 2023-08-24 23:53:28.905 JupyterHub proxy:477] Adding route for Hub: / => http://jupyterhub:8080
jupyterhub | 23:53:28.907 [ConfigProxy] info: Adding route / -> http://jupyterhub:8080
jupyterhub | 23:53:28.908 [ConfigProxy] info: Route added / -> http://jupyterhub:8080
jupyterhub | 23:53:28.908 [ConfigProxy] info: 201 POST /api/routes/
jupyterhub | [I 2023-08-24 23:53:28.909 JupyterHub app:3245] JupyterHub is now running at http://:8000
jupyterhub | [I 2023-08-24 23:53:34.526 JupyterHub log:191] 302 GET / -> /hub/ (@::ffff:98.210.128.78) 1.27ms
jupyterhub | [I 2023-08-24 23:53:34.590 JupyterHub log:191] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@::ffff:98.210.128.78) 0.88ms
jupyterhub | [I 2023-08-24 23:53:34.677 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2F (@::ffff:98.210.128.78) 28.16ms
jupyterhub | [I 2023-08-24 23:53:40.737 JupyterHub log:191] 200 GET /hub/signup (@::ffff:98.210.128.78) 11.94ms
jupyterhub | [I 2023-08-24 23:53:47.695 JupyterHub log:191] 302 GET / -> /hub/ (@::ffff:64.180.89.191) 0.92ms
jupyterhub | [I 2023-08-24 23:53:47.753 JupyterHub log:191] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@::ffff:64.180.89.191) 0.82ms
jupyterhub | [I 2023-08-24 23:53:47.805 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2F (@::ffff:64.180.89.191) 1.64ms
jupyterhub | [W 2023-08-24 23:53:54.756 JupyterHub base:843] Failed login for admin
jupyterhub | [I 2023-08-24 23:53:54.758 JupyterHub log:191] 200 POST /hub/login?next=%2Fhub%2F (@::ffff:64.180.89.191) 5.69ms
jupyterhub | [W 2023-08-24 23:53:58.037 JupyterHub base:843] Failed login for admin
jupyterhub | [I 2023-08-24 23:53:58.039 JupyterHub log:191] 200 POST /hub/login?next=%2Fhub%2F (@::ffff:64.180.89.191) 4.11ms
jupyterhub | [I 2023-08-24 23:53:59.886 JupyterHub log:191] 200 GET /hub/signup (@::ffff:64.180.89.191) 1.91ms
jupyterhub | [I 2023-08-24 23:54:06.286 JupyterHub log:191] 200 POST /hub/signup (@::ffff:64.180.89.191) 294.40ms
jupyterhub | [I 2023-08-24 23:54:08.597 JupyterHub log:191] 200 GET /hub/login (@::ffff:64.180.89.191) 3.81ms
jupyterhub | [I 2023-08-24 23:54:13.767 JupyterHub base:837] User logged in: admin
jupyterhub | [I 2023-08-24 23:54:13.771 JupyterHub log:191] 302 POST /hub/login?next= -> /hub/spawn (admin@::ffff:64.180.89.191) 293.63ms
jupyterhub | [I 2023-08-24 23:54:13.823 JupyterHub log:191] 302 GET /hub/spawn -> /hub/login?next=%2Fhub%2Fspawn (@::ffff:64.180.89.191) 1.94ms
jupyterhub | [I 2023-08-24 23:54:13.875 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fspawn (@::ffff:64.180.89.191) 3.21ms
jupyterhub | 23:58:28.912 [ConfigProxy] info: 200 GET /api/routes
jupyterhub | 00:03:28.912 [ConfigProxy] info: 200 GET /api/routes
jupyterhub | 00:08:28.911 [ConfigProxy] info: 200 GET /api/routes
jupyterhub | [I 2023-08-25 00:09:34.265 JupyterHub log:191] 200 GET /hub/login (@::ffff:98.210.128.78) 1.86ms
jupyterhub | [I 2023-08-25 00:09:37.582 JupyterHub base:837] User logged in: admin
jupyterhub | [I 2023-08-25 00:09:37.583 JupyterHub log:191] 302 POST /hub/login?next= -> /hub/spawn (admin@::ffff:98.210.128.78) 279.89ms
jupyterhub | [I 2023-08-25 00:09:37.644 JupyterHub log:191] 302 GET /hub/spawn -> /hub/login?next=%2Fhub%2Fspawn (@::ffff:98.210.128.78) 0.82ms
jupyterhub | [I 2023-08-25 00:09:37.705 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2Fspawn (@::ffff:98.210.128.78) 1.65ms