jupyterhub-deploy-docker
jupyterhub-deploy-docker copied to clipboard
user-container can't be started due to the bug in the jupyterhub code
Trying to start a notebook for a user leads to the following log:
[I 2019-03-15 15:18:27.936 JupyterHub app:1673] Using Authenticator: dummyauthenticator.dummyauthenticator.DummyAuthenticator
[I 2019-03-15 15:18:27.936 JupyterHub app:1673] Using Spawner: dockerspawner.dockerspawner.DockerSpawner-0.11.0
[I 2019-03-15 15:18:27.943 JupyterHub app:1016] Loading cookie_secret from /data/jupyterhub_cookie_secret
[I 2019-03-15 15:18:28.051 JupyterHub proxy:431] Generating new CONFIGPROXY_AUTH_TOKEN
[I 2019-03-15 15:18:28.141 JupyterHub app:1855] Hub API listening on http://jupyterhub:8080/hub/
[W 2019-03-15 15:18:28.149 JupyterHub proxy:565] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2019-03-15 15:18:28.149 JupyterHub proxy:567] Starting proxy @ http://:8000
15:18:28.793 - info: [ConfigProxy] Proxying http://*:8000 to (no default)
15:18:28.795 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes
15:18:29.109 - info: [ConfigProxy] 200 GET /api/routes
[I 2019-03-15 15:18:29.112 JupyterHub proxy:301] Checking routes
[I 2019-03-15 15:18:29.113 JupyterHub proxy:370] Adding default route for Hub: / => http://jupyterhub:8080
15:18:29.117 - info: [ConfigProxy] Adding route / -> http://jupyterhub:8080
15:18:29.118 - info: [ConfigProxy] 201 POST /api/routes/
[I 2019-03-15 15:18:29.120 JupyterHub app:1912] JupyterHub is now running at http://:8000
[I 2019-03-15 15:18:29.995 JupyterHub log:158] 302 GET / -> /hub (@::ffff:172.19.0.1) 3.71ms
[I 2019-03-15 15:18:30.010 JupyterHub log:158] 302 GET /hub -> /hub/ (@::ffff:172.19.0.1) 2.44ms
[I 2019-03-15 15:18:30.033 JupyterHub log:158] 302 GET /hub/ -> /user/max/ (max@::ffff:172.19.0.1) 15.87ms
[I 2019-03-15 15:18:30.048 JupyterHub log:158] 302 GET /user/max/ -> /hub/user/max/ (@::ffff:172.19.0.1) 1.14ms
[W 2019-03-15 15:18:30.072 JupyterHub dockerspawner:173] DockerSpawner.container_image is deprecated in dockerspawner 0.9. Use DockerSpawner.image
[I 2019-03-15 15:18:30.183 JupyterHub dockerspawner:785] Container 'jupyter-max' is gone
[E 2019-03-15 15:18:30.195 JupyterHub user:477] Unhandled error starting max's server: 'dict' object is not callable
[I 2019-03-15 15:18:30.204 JupyterHub dockerspawner:785] Container 'jupyter-max' is gone
[W 2019-03-15 15:18:30.205 JupyterHub dockerspawner:758] Container not found: jupyter-max
[E 2019-03-15 15:18:30.244 JupyterHub web:1670] Uncaught exception GET /hub/user/max/ (::ffff:172.19.0.1)
HTTPServerRequest(protocol='http', host='10.20.63.207:8000', method='GET', uri='/hub/user/max/', version='HTTP/1.1', remote_ip='::ffff:172.19.0.1')
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 1052, in get
await self.spawn_single_user(user)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 705, in spawn_single_user
timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 626, in finish_user_spawn
await spawn_future
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 489, in spawn
raise e
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 409, in spawn
url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 984, in start
obj = yield self.create_object()
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 852, in create_object
command=(yield self.get_command()),
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 812, in get_command
return cmd + self.get_args()
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 726, in get_args
args = super().get_args()
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/spawner.py", line 700, in get_args
notebook_dir = self.format_string(self.notebook_dir)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/spawner.py", line 681, in format_string
return s.format(**self.template_namespace())
TypeError: 'dict' object is not callable
[E 2019-03-15 15:18:30.298 JupyterHub log:150] {
"X-Forwarded-Host": "10.20.63.207:8000",
"X-Forwarded-Proto": "http",
"X-Forwarded-Port": "8000",
"X-Forwarded-For": "::ffff:172.19.0.1",
"Cookie": "jupyterhub-hub-login=\"2|1:0|10:1552593619|20:jupyterhub-hub-login|44:Y2ZhNTZmY2RmY2M1NGM5ZDg4ZWViMmVhYjlhODEwZGY=|d0b1f117d749dd1d8ae27fa14b57fb52a75daaf191cf88e761618c9a73b706ba\"; adminer_sid=6444b3f27dbebe956cc88cad2f1032b6; adminer_key=386596ed3d1aa77644d0f1249837a1d8; sharelatex.sid=s%3AVkC_J4hT-8Z1jJXo1YkDWubyH9fFuN40.0RY%2BGpn4IDRzh7FdyaRalijU%2Br6ww%2FlBMA5lFRhHYj8; _xsrf=2|1f6e3ce9|88260ca22fb0bee1d70ba087de2e8f88|1552412343; jupyterhub-session-id=f7ca925e62004847b856f4079eb20eed",
"Accept-Language": "en-US,en;q=0.9,de;q=0.8,ru;q=0.7,fr;q=0.6,uk;q=0.5",
"Accept-Encoding": "gzip, deflate",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Dnt": "1",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
"Upgrade-Insecure-Requests": "1",
"Cache-Control": "max-age=0",
"Connection": "close",
"Host": "10.20.63.207:8000"
}
[E 2019-03-15 15:18:30.298 JupyterHub log:158] 500 GET /hub/user/max/ (max@::ffff:172.19.0.1) 240.88ms
The log already points to the bug and if I substitute the function call with return s.format(**self.template_namespace) everything works fine. However, the function def template_namespace(self) is indeed a function and not a property, so I'm a bit confused. Am I the only person, which has this issue? Please find attached the files, which I've changed, If You would like to reproduce the situtation.
files.zip
Related to jupyterhub/dockerspawner#290
Hi :wave: This is an old issue and the repository has been updated. If you have more questions please use the Jupyter community forum https://discourse.jupyter.org/.