Bug description
After logging in jupyterhub, 500 error with spawner occurs.
Expected behaviour
Jupyter should spawn container
Actual behaviour
I have an error 500 : Internal Server Error
Unhandled error starting server
How to reproduce
- add Dockerfile:
FROM jupyterhub/jupyterhub:2.0
RUN pip install dockerspawner
COPY jupyterhub_config.py /srv/jupyterhub
- add docker-compose:
version: '2.3'
services:
jupyterhub:
build: ./jupyterhub
image: jupyterhub/jupyterhub:2.0
ports:
- '8000:8000'
container_name: jupyterhub-user
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./jupyterhub/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py
environment:
DOCKER_JUPYTER_CONTAINER: jupyter-notebook
DOCKER_JUPYTER_IMAGE: neuroml/seminar2:no_fs
DOCKER_NETWORK_NAME: ${COMPOSE_PROJECT_NAME}_default
HUB_IP: '127.0.0.1'
- docker compose build && docker compose up
Your personal set up
- OS:
ubuntu 18.04 - Version(s):
docker jupyterhub 2.0
alembic @ file:///tmp/wheelhouse/alembic-1.7.5-py3-none-any.whl
async-generator @ file:///tmp/wheelhouse/async_generator-1.10-py3-none-any.whl
attrs @ file:///tmp/wheelhouse/attrs-21.4.0-py2.py3-none-any.whl
certifi @ file:///tmp/wheelhouse/certifi-2021.10.8-py2.py3-none-any.whl
certipy @ file:///tmp/wheelhouse/certipy-0.1.3-py3-none-any.whl
cffi @ file:///tmp/wheelhouse/cffi-1.15.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
charset-normalizer @ file:///tmp/wheelhouse/charset_normalizer-2.0.10-py3-none-any.whl
cryptography @ file:///tmp/wheelhouse/cryptography-36.0.1-cp36-abi3-manylinux_2_24_x86_64.whl
docker==6.0.0
dockerspawner==12.1.0
entrypoints @ file:///tmp/wheelhouse/entrypoints-0.3-py2.py3-none-any.whl
escapism==1.0.1
greenlet @ file:///tmp/wheelhouse/greenlet-1.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
idna @ file:///tmp/wheelhouse/idna-3.3-py3-none-any.whl
importlib-metadata @ file:///tmp/wheelhouse/importlib_metadata-4.10.0-py3-none-any.whl
importlib-resources @ file:///tmp/wheelhouse/importlib_resources-5.4.0-py3-none-any.whl
Jinja2 @ file:///tmp/wheelhouse/Jinja2-3.0.3-py3-none-any.whl
jsonschema @ file:///tmp/wheelhouse/jsonschema-4.3.3-py3-none-any.whl
jupyter-telemetry @ file:///tmp/wheelhouse/jupyter_telemetry-0.1.0-py3-none-any.whl
jupyterhub @ file:///tmp/wheelhouse/jupyterhub-2.0.2-py3-none-any.whl
Mako @ file:///tmp/wheelhouse/Mako-1.1.6-py2.py3-none-any.whl
MarkupSafe @ file:///tmp/wheelhouse/MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
oauthlib @ file:///tmp/wheelhouse/oauthlib-3.1.1-py2.py3-none-any.whl
packaging @ file:///tmp/wheelhouse/packaging-21.3-py3-none-any.whl
pamela @ file:///tmp/wheelhouse/pamela-1.0.0-py2.py3-none-any.whl
prometheus-client @ file:///tmp/wheelhouse/prometheus_client-0.12.0-py2.py3-none-any.whl
pycparser @ file:///tmp/wheelhouse/pycparser-2.21-py2.py3-none-any.whl
pycurl==7.43.0.2
pyOpenSSL @ file:///tmp/wheelhouse/pyOpenSSL-21.0.0-py2.py3-none-any.whl
pyparsing @ file:///tmp/wheelhouse/pyparsing-3.0.6-py3-none-any.whl
pyrsistent @ file:///tmp/wheelhouse/pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl
python-dateutil @ file:///tmp/wheelhouse/python_dateutil-2.8.2-py2.py3-none-any.whl
python-json-logger @ file:///tmp/wheelhouse/python_json_logger-2.0.2-py3-none-any.whl
requests @ file:///tmp/wheelhouse/requests-2.27.1-py2.py3-none-any.whl
ruamel.yaml @ file:///tmp/wheelhouse/ruamel.yaml-0.17.20-py3-none-any.whl
ruamel.yaml.clib @ file:///tmp/wheelhouse/ruamel.yaml.clib-0.2.6-cp38-cp38-manylinux1_x86_64.whl
six @ file:///tmp/wheelhouse/six-1.16.0-py2.py3-none-any.whl
SQLAlchemy @ file:///tmp/wheelhouse/SQLAlchemy-1.4.29-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
tornado @ file:///tmp/wheelhouse/tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl
traitlets @ file:///tmp/wheelhouse/traitlets-5.1.1-py3-none-any.whl
urllib3 @ file:///tmp/wheelhouse/urllib3-1.26.8-py2.py3-none-any.whl
websocket-client==1.4.1
zipp @ file:///tmp/wheelhouse/zipp-3.7.0-py3-none-any.whl
Configuration File:
import os
c.JupyterHub.spawner_class = "dockerspawner.DockerSpawner"
c.DockerSpawner.image = os.environ["DOCKER_JUPYTER_IMAGE"]
c.DockerSpawner.network_name = os.environ["DOCKER_NETWORK_NAME"]
#sc.JupyterHub.ip = 'server1'
c.JupyterHub.hub_ip = '127.0.0.1'
#c.JupyterHub.hub_ip = os.environ["HUB_IP"]
c.JupyterHub.authenticator_class = 'dummy'
c.DummyAuthenticator.password = "pass"
c.Authenticator.admin_users = {'user'}
notebook_dir = os.environ.get('DOCKER_NOTEBOOK_DIR') or '/workspace'
c.DockerSpawner.notebook_dir = notebook_dir
# Mount the real user's Docker volume on the host to the notebook user's
# notebook directory in the container
# c.DockerSpawner.volumes = {
# 'jupyterhub-user-{username}': notebook_dir,
# 'jupyterhub-shared': '/workspaces/neuroml_course_data',
# 'jupyterhub-data': '/home/user/neuroml_course_data/data'
# }
c.DockerSpawner.remove = True
c.Spawner.default_url = '/notebook'
jupyterhub-user | [E 2022-09-20 09:40:58.471 JupyterHub log:189] 500 GET /hub/spawn (user@::ffff:10.16.112.1) 119.53ms
jupyterhub-user | [I 2022-09-20 09:41:01.630 JupyterHub log:189] 200 GET /hub/home (user@::ffff:10.16.112.1) 6.62ms
jupyterhub-user | [I 2022-09-20 09:41:02.556 JupyterHub roles:477] Adding role server to token: <APIToken('3ad5...', user='user', client_id='jupyterhub')>
jupyterhub-user | [I 2022-09-20 09:41:02.575 JupyterHub provider:607] Creating oauth client jupyterhub-user-user
jupyterhub-user | [I 2022-09-20 09:41:02.623 JupyterHub dockerspawner:988] Container 'jupyter-user' is gone
jupyterhub-user | [E 2022-09-20 09:41:02.628 JupyterHub user:762] Unhandled error starting user's server: unsupported operand type(s) for +: 'NoneType' and 'list'
jupyterhub-user | [I 2022-09-20 09:41:02.630 JupyterHub dockerspawner:988] Container 'jupyter-user' is gone
jupyterhub-user | [W 2022-09-20 09:41:02.630 JupyterHub dockerspawner:963] Container not found: jupyter-user
jupyterhub-user | [E 2022-09-20 09:41:02.670 JupyterHub pages:311] Error starting server user: unsupported operand type(s) for +: 'NoneType' and 'list'
jupyterhub-user | Traceback (most recent call last):
jupyterhub-user | None: None
jupyterhub-user |
jupyterhub-user | [W 2022-09-20 09:41:02.670 JupyterHub web:1787] 500 GET /hub/spawn/user (::ffff:10.16.112.1): Unhandled error starting server user
jupyterhub-user | [E 2022-09-20 09:41:02.671 JupyterHub log:181] {
jupyterhub-user | "X-Forwarded-Host": "server1:8000",
jupyterhub-user | "X-Forwarded-Proto": "http",
jupyterhub-user | "X-Forwarded-Port": "8000",
jupyterhub-user | "X-Forwarded-For": "::ffff:10.16.112.1",
jupyterhub-user | "Cookie": "jupyterhub-hub-login=[secret]; grafana_session=[secret]; JSESSIONID.337955a1=[secret]; oauthenticator-state=[secret]; jupyterhub-session-id=[secret]",
jupyterhub-user | "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
jupyterhub-user | "Accept-Encoding": "gzip, deflate",
jupyterhub-user | "Referer": "http://server1:8000/hub/home",
jupyterhub-user | "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
jupyterhub-user | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
jupyterhub-user | "Upgrade-Insecure-Requests": "1",
jupyterhub-user | "Connection": "close",
jupyterhub-user | "Host": "server1:8000"
jupyterhub-user | }
jupyterhub-user | [E 2022-09-20 09:41:02.671 JupyterHub log:189] 500 GET /hub/spawn/user (user@::ffff:10.16.112.1) 126.65ms