jupyterhub-deploy-docker
jupyterhub-deploy-docker copied to clipboard
docker: host does not create user container (invalid reference format)
From @inkrement on January 24, 2018 7:43
I basically, tried to run the Jupyterhub/docker-demo, but upgraded to the newest docker-versions.
The server itself and Github-OAuth work fine, but when I get redirected from Github (right after authentication) I get the following error (and an uncaught exception):
jupyterhub | [I 2018-01-24 07:20:32.789 JupyterHub log:124] 302 GET /user/inkrement/ -> /hub/user/inkrement/ (@::ffff:137.208.40.78) 1.14ms
jupyterhub | [I 2018-01-24 07:20:32.888 JupyterHub dockerspawner:373] Container 'jupyter-inkrement' is gone
jupyterhub | [E 2018-01-24 07:20:32.911 JupyterHub user:427] Unhandled error starting inkrement's server: 500 Server Error: Internal Server Error ("invalid reference format")
jupyterhub | [I 2018-01-24 07:20:32.918 JupyterHub dockerspawner:373] Container 'jupyter-inkrement' is gone
jupyterhub | [W 2018-01-24 07:20:32.918 JupyterHub dockerspawner:344] container not found
I checked all running and stoped docker containers, but there is no container named "jupyter-inkrement". It seems like it was not able to spawn the docker container, but I do not know what to do. Any suggestions?
The container-docker is linked to the host-docker via volume as in the demo and I am using a quite new docker version: 17.05.0-ce, build 89658be
Copied from original issue: jupyterhub/jupyterhub#1630
Hi @inkrement,
I've moved this issue as it's better suited for this repo.
@willingc Thanks! I was not sure if it is a software bug or just a broken configuration. But you are completely right, it's probably the later one!
Thanks @inkrement. I suspect this is a legitimate issue with the configuration in this repo. If you find a fix or wish to update the repo, PRs are welcome. :sunny:
@willingc Hi, I would really like to help. But I have to admit, that I am a jupyterhub-newbie. Do you have an idea, what could be wrong? Seems like spawning does not work as expected.. so I would guess that it is related to the Dockerspawner, right?
The server itself and Github-OAuth work fine
Just make sure and factor this out of the equation, I recommend you do the following:
diff --git a/.env b/.env
index f012497..a5fd487 100644
--- a/.env
+++ b/.env
@@ -18,6 +18,9 @@ DOCKER_NETWORK_NAME=jupyterhub-network
# Single-user Jupyter Notebook server container image
DOCKER_NOTEBOOK_IMAGE=jupyter/minimal-notebook:e1677043235c
+# For testing only :)
+DUMMY_PASSWORD=fourwordsalluppercase
+
# the local image we use, after pinning jupyterhub version
LOCAL_NOTEBOOK_IMAGE=jupyterhub-user
diff --git a/Dockerfile.jupyterhub b/Dockerfile.jupyterhub
index dfcf049..5159104 100644
--- a/Dockerfile.jupyterhub
+++ b/Dockerfile.jupyterhub
@@ -8,6 +8,7 @@ RUN /opt/conda/bin/conda install -yq psycopg2=2.7 && \
/opt/conda/bin/conda clean -tipsy && \
/opt/conda/bin/pip install --no-cache-dir \
oauthenticator==0.7.* \
+ jupyterhub-dummyauthenticator \
dockerspawner==0.9.*
# Copy TLS certificate and key
diff --git a/jupyterhub_config.py b/jupyterhub_config.py
index dc925dd..72f4546 100644
--- a/jupyterhub_config.py
+++ b/jupyterhub_config.py
@@ -52,8 +52,10 @@ c.JupyterHub.ssl_key = os.environ['SSL_KEY']
c.JupyterHub.ssl_cert = os.environ['SSL_CERT']
# Authenticate users with GitHub OAuth
-c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
-c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL']
+#c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
+#c.GitHubOAuthenticator.oauth_callback_url = os.environ['OAUTH_CALLBACK_URL']
+c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
+c.DummyAuthenticator.password = os.environ.get('DUMMY_PASSWORD')
# Persist hub data on volume mounted inside container
data_dir = os.environ.get('DATA_VOLUME_CONTAINER', '/data')
Rebuild the JupyterHub image ($ make build) and try again.
Keep using the Dummy Authenticator until everything else works as expected. Unroll your changes one by one until you are able to connect to your user's Notebook server. If you are using a custom Jupyter Notebook image, go back to the default jupyter/scipy-notebook image, etc.
I hope this helps.