Good Afternoon All,
I am new to Jupyter. Installed JupyterHub in Docker with LDAP auth, LDAP is working fine, but when users authenticates, am getting Spawn failed messages.
Have tried solutions already proposed on different posts, but am still stuck.
My config and debug files:
Dockerfile:
FROM jupyterhub/jupyterhub:latest
RUN pip install --trusted-host pypi --trusted-host pypi.python --trusted-host=files.pythonhosted
jupyterhub-ldapauthenticator jupyterlab notebook
Jupyterhub_config.py
c = get_config()
c.JupyterHub.authenticator_class = ‘ldapauthenticator.LDAPAuthenticator’
c.LDAPAuthenticator.server_address = ‘172.30.2.5’
c.LDAPAuthenticator.use_ssl = False
c.LDAPAuthenticator.server_port = 389
c.LDAPAuthenticator.lookup_dn_search_filter = ‘({login_attr}={login})’
c.LDAPAuthenticator.lookup_dn_search_user = ‘(USER)’
c.LDAPAuthenticator.lookup_dn_search_password = ‘(PASSWORD)’
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.user_search_base = 'DOMAIN
c.LDAPAuthenticator.user_attribute = ‘sAMAccountName’
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = ‘distinguishedName’
c.LDAPAuthenticator.allowed_groups = [
“GROUP”
]
c.JupyterHub.spawner_class = ‘simple’
c.Spawner.default_url = ‘/lab’
c.Spawner.notebook_dir = ‘/home/jovyan/work’
c.Spawner.http_timeout = 60
c.Spawner.log_level = ‘DEBUG’
c.Spawner.output_log = True
#c.LDAPAuthenticator.debug = True
All I am getting after login:
File “/usr/lib/python3.10/asyncio/tasks.py”, line 456, in wait_for
return fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py”, line 1255, in spawn_single_user
await asyncio.wait_for(
File “/usr/lib/python3.10/asyncio/tasks.py”, line 458, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
[W 2025-04-20 14:05:57.822 JupyterHub user:1052] (USER) server never showed up at after 60 seconds. Giving up.
Common causes of this timeout, and debugging tips:
- The server didn’t finish starting,
or it crashed due to a configuration issue.
Check the single-user server’s logs for hints at what needs fixing. - The server started, but is not accessible at the specified URL.
This may be a configuration issue specific to your chosen Spawner.
Check the single-user server logs and resource to make sure the URL
is correct and accessible from the Hub. - (unlikely) Everything is working, but the server took too long to respond.
To fix: increaseSpawner.http_timeout
configuration
to a number of seconds that is enough for servers to become responsive.
[E 2025-04-20 14:05:57.856 JupyterHub gen:629] Exception in Future <Task finished name=‘Task-52’ coro=<BaseHandler.spawn_single_user..finish_user_spawn() done, defined at /usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py:1117>
exception=TimeoutError(“Server at [127.0.0.1:56677/user/ (USER) /api](127.0.0.1:56677/user/ (USER) /api) didn’t respond in 60 seconds”)> after timeout
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/tornado/gen.py”, line 624, in error_callback
future.result()
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py”, line 1124, in finish_user_spawn
await spawn_future
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py”, line 1030, in spawn
await self._wait_up(spawner)
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py”, line 1073, in _wait_up
raise e
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/user.py”, line 1044, in _wait_up
resp = await server.wait_up(
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/utils.py”, line 327, in wait_for_http_server
re = await exponential_backoff(
File “/usr/local/lib/python3.10/dist-packages/jupyterhub/utils.py”, line 267, in exponential_backoff
raise asyncio.TimeoutError(fail_message)
asyncio.exceptions.TimeoutError: Server at [127.0.0.1:56677/user/ (USER) /api](127.0.0.1:56677/user/ (USER) /api) didn’t respond in 60 seconds
[I 2025-04-20 14:05:57.857 JupyterHub log:192] 200 GET /hub/api/users/vk/server/progress?_xsrf=[secret] (USER) @::ffff:172.19.0.1) 60845.26ms
14:09:32.833 [ConfigProxy] info: 200 GET /api/routes
14:14:32.833 [ConfigProxy] info: 200 GET /api/routes
Any help will be greatly appreciated