'The absolute minimal JupyterHub user image' does not work with dockerspawner.SystemUserSpawner(?)

I tried this absolute minimal JupyterHub user image with dockerspawner.SystemUserSpawner

FROM python:3.6
RUN pip3 install \
    jupyterhub==0.7.2 \

# create a user, since we don't want to run as root
RUN useradd -m jovyan
ENV HOME=/home/jovyan
USER jovyan

CMD ["jupyterhub-singleuser"]

But it failed like this

[I 2019-05-24 02:00:33.419 JupyterHub dockerspawner:784] Container 'jupyter-knishida' is gone
[I 2019-05-24 02:00:33.448 JupyterHub log:174] 302 GET /hub/spawn/knishida -> /hub/spawn-pending/knishida (knishida@::ffff: 1015.15ms
[I 2019-05-24 02:00:33.523 JupyterHub dockerspawner:990] Created container jupyter-knishida (id: d633f8e) from image spawntrial:1.0
[I 2019-05-24 02:00:33.524 JupyterHub dockerspawner:1013] Starting container jupyter-knishida (id: d633f8e)
[I 2019-05-24 02:00:40.081 JupyterHub log:174] 200 GET /hub/token (knishida@::ffff: 19.75ms
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<BaseHandler.spawn_single_user() done, defined at /usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py:697> exception=HTTPError()>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py", line 889, in spawn_single_user
    timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
tornado.util.TimeoutError: Timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py", line 922, in spawn_single_user
    % (status, spawner._log_name),
tornado.web.HTTPError: HTTP 500: Internal Server Error (Spawner failed to start [status=ExitCode=1, Error='', FinishedAt=2019-05-23T17:00:36.553144943Z]. The logs for knishida may contain details.)
[I 2019-05-24 02:00:46.218 JupyterHub log:174] 200 GET /hub/home (knishida@::ffff: 15.75ms
[I 2019-05-24 02:00:47.779 JupyterHub log:174] 302 GET /user/knishida -> /user/knishida/ (@::ffff: 2.00ms
[I 2019-05-24 02:00:47.788 JupyterHub log:174] 302 GET /user/knishida/ -> /hub/user/knishida/ (@::ffff: 1.80ms
[I 2019-05-24 02:00:47.812 JupyterHub log:174] 303 GET /hub/user/knishida/ (knishida@::ffff: 13.52ms
[I 2019-05-24 02:00:47.832 JupyterHub pages:303] knishida is pending spawn
[I 2019-05-24 02:00:47.834 JupyterHub log:174] 200 GET /hub/spawn-pending/knishida?next=%2Fhub%2Fuser%2Fknishida%2F (knishida@::ffff: 11.92ms
[I 2019-05-24 02:00:58.083 JupyterHub log:174] 302 GET /user/knishida -> /user/knishida/ (@::ffff: 1.91ms
[I 2019-05-24 02:00:58.095 JupyterHub log:174] 302 GET /user/knishida/ -> /hub/user/knishida/ (@::ffff: 1.72ms
[I 2019-05-24 02:00:58.119 JupyterHub log:174] 303 GET /hub/user/knishida/ (knishida@::ffff: 12.42ms
[I 2019-05-24 02:00:58.137 JupyterHub pages:303] knishida is pending spawn
[W 2019-05-24 02:01:02.216 JupyterHub user:678] knishida's server never showed up at after 30 seconds. Giving up
[E 2019-05-24 02:01:02.244 JupyterHub gen:593] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py:800> exception=TimeoutError("Server at didn't respond in 30 seconds",)> after timeout
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/tornado/gen.py", line 589, in error_callback
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/handlers/base.py", line 807, in finish_user_spawn
        await spawn_future
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/user.py", line 654, in spawn
        await self._wait_up(spawner)
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/user.py", line 701, in _wait_up
        raise e
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/user.py", line 669, in _wait_up
        http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/utils.py", line 234, in wait_for_http_server
      File "/usr/local/lib/python3.6/dist-packages/jupyterhub/utils.py", line 177, in exponential_backoff
        raise TimeoutError(fail_message)
    TimeoutError: Server at didn't respond in 30 seconds

[W 2019-05-24 02:01:02.245 JupyterHub users:512] Stream closed while handling /hub/api/users/knishida/server/progress
[I 2019-05-24 02:01:02.246 JupyterHub log:174] 200 GET /hub/api/users/knishida/server/progress (knishida@::ffff: 29457.04ms
[W 2019-05-24 02:01:02.246 JupyterHub users:512] Stream closed while handling /hub/api/users/knishida/server/progress
[I 2019-05-24 02:01:02.246 JupyterHub log:174] 200 GET /hub/api/users/knishida/server/progress (knishida@::ffff: 14238.77ms
[I 2019-05-24 02:01:02.247 JupyterHub log:174] 200 GET /hub/api/users/knishida/server/progress (knishida@::ffff: 3939.32ms
02:03:50.750 [ConfigProxy] info: 200 GET /api/routes
[I 2019-05-24 02:03:50.751 JupyterHub proxy:319] Checking routes

Do you have any idea about this?

I’m using

  • jupyterhub 1.0.0
  • python 3.6.7