Hello everyone,
I am facing and issue while setting up jupyterhub.
For me both Hub and proxy are running and when I try to login(Authenticator disabled) and get redirected to single user server my Hub crashes after few attempts. Adding my Hub Logs for more detail:
**[I 2023-03-14 10:11:20.211 JupyterHub pages:396] sunkumar is pending spawn**
**[I 2023-03-14 10:11:20.214 JupyterHub log:186] 200 GET /hub/spawn-pending/sunkumar (sunkumar@10.244.43.64) 5.17ms**
**[D 2023-03-14 10:11:20.520 JupyterHub scopes:863] Checking access via scope read:servers**
**[D 2023-03-14 10:11:20.520 JupyterHub scopes:690] Argument-based access to /hub/api/users/sunkumar/server/progress via read:servers**
**[D 2023-03-14 10:11:20.521 JupyterHub spawner:2328] progress generator: jupyter-sunkumar**
**[D 2023-03-14 10:11:20.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.56ms**
**[D 2023-03-14 10:11:21.605 JupyterHub log:186] 200 GET /hub/static/components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 (@10.44.186.205) 1.12ms**
**[D 2023-03-14 10:11:22.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.61ms**
**[I 2023-03-14 10:11:22.938 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:24.932 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 1.25ms**
**[I 2023-03-14 10:11:25.985 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:26.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.55ms**
**[D 2023-03-14 10:11:28.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.53ms**
**[I 2023-03-14 10:11:29.116 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:30.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.58ms**
**[I 2023-03-14 10:11:32.710 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:32.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.53ms**
**[D 2023-03-14 10:11:34.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.62ms**
**[I 2023-03-14 10:11:36.428 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:36.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.61ms**
**[D 2023-03-14 10:11:38.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.51ms**
**[D 2023-03-14 10:11:40.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.55ms**
**[I 2023-03-14 10:11:42.881 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:42.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.56ms**
**[D 2023-03-14 10:11:43.904 JupyterHub proxy:880] Proxy: Fetching GET http://proxy-api:8001/api/routes**
**[D 2023-03-14 10:11:43.908 JupyterHub proxy:392] Checking routes**
**[D 2023-03-14 10:11:44.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.56ms**
**[D 2023-03-14 10:11:46.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.57ms**
**[D 2023-03-14 10:11:48.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.60ms**
**[I 2023-03-14 10:11:50.884 JupyterHub spawner:2529] Attempting to create pvc claim-sunkumar, with timeout 3**
**[D 2023-03-14 10:11:50.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.64ms**
**[D 2023-03-14 10:11:52.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.59ms**
**[W 2023-03-14 10:11:53.885 JupyterHub user:825] sunkumar's server failed to start in 300 seconds, giving up.**
** **
** Common causes of this timeout, and debugging tips:**
** **
** 1. Everything is working, but it took too long.**
** To fix: increase `Spawner.start_timeout` configuration**
** to a number of seconds that is enough for spawners to finish starting.**
** 2. 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.**
** **
**[D 2023-03-14 10:11:53.885 JupyterHub user:931] Stopping sunkumar**
**[D 2023-03-14 10:11:54.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.56ms**
**[D 2023-03-14 10:11:56.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.57ms**
**[D 2023-03-14 10:11:58.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.53ms**
**[D 2023-03-14 10:12:00.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.52ms**
**[D 2023-03-14 10:12:02.929 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.58ms**
**[D 2023-03-14 10:12:04.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.55ms**
**[D 2023-03-14 10:12:06.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.54ms**
**[D 2023-03-14 10:12:08.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.58ms**
**[D 2023-03-14 10:12:10.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.53ms**
**[D 2023-03-14 10:12:12.931 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.99ms**
**[D 2023-03-14 10:12:14.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.79ms**
**[D 2023-03-14 10:12:16.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.54ms**
**[D 2023-03-14 10:12:18.930 JupyterHub log:186] 200 GET /hub/health (@10.44.186.212) 0.51ms**
**[E 2023-03-14 10:12:20.418 JupyterHub reflector:385] Initial list of pods failed**
** Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
** TimeoutError**
** **
**[E 2023-03-14 10:12:20.420 JupyterHub reflector:385] Initial list of events failed**
** Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
** TimeoutError**
** **
**[E 2023-03-14 10:12:20.508 JupyterHub user:843] Failed to cleanup sunkumar's server that failed to start**
** Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/jupyterhub/user.py", line 841, in spawn**
** await self.stop(spawner.name)**
** File "/usr/local/lib/python3.11/site-packages/jupyterhub/user.py", line 935, in stop**
** status = await spawner.poll()**
** ^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py", line 212, in async_method**
** await self.pod_reflector.first_load_future**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
** TimeoutError**
** **
**[E 2023-03-14 10:12:20.510 JupyterHub spawner:2422] Reflector for pods failed to start.**
** Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py", line 2420, in catch_reflector_start**
** await f**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
** TimeoutError**
** **
**Task was destroyed but it is pending!**
**task: <Task pending name='Task-233' coro=<KubeSpawner._start_reflector.<locals>.catch_reflector_start() running at /usr/local/lib/python3.11/site-packages/kubespawner/spawner.py:2420> wait_for=<Task finished name='Task-232' coro=<ResourceReflector.start() done, defined at /usr/local/lib/python3.11/site-packages/kubespawner/reflector.py:370> exception=TimeoutError()>>**
**Task exception was never retrieved**
**future: <Task finished name='Task-232' coro=<ResourceReflector.start() done, defined at /usr/local/lib/python3.11/site-packages/kubespawner/reflector.py:370> exception=TimeoutError()>**
**Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
**TimeoutError**
**Task was destroyed but it is pending!**
**task: <Task pending name='Task-229' coro=<shared_client.<locals>.close_client_task() running at /usr/local/lib/python3.11/site-packages/kubespawner/clients.py:58> wait_for=<Future pending cb=[Task.task_wakeup()]>>**
**Exception ignored in: <coroutine object shared_client.<locals>.close_client_task at 0x7f4459687100>**
**RuntimeError: coroutine ignored GeneratorExit**
**Task exception was never retrieved**
**future: <Task finished name='Task-231' coro=<KubeSpawner._start_reflector.<locals>.catch_reflector_start() done, defined at /usr/local/lib/python3.11/site-packages/kubespawner/spawner.py:2418> exception=SystemExit(1)>**
**Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py", line 2420, in catch_reflector_start**
** await f**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 383, in start**
** await self._list_and_update()**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/reflector.py", line 228, in _list_and_update**
** initial_resources_raw = await list_method(**kwargs)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/api_client.py", line 185, in __call_api**
** response_data = await self.request(**
** ^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 193, in GET**
** return (await self.request("GET", url,**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/kubernetes_asyncio/client/rest.py", line 177, in request**
** r = await self.pool_manager.request(**args)**
** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 467, in _request**
** with timer:**
** File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 720, in __exit__**
** raise asyncio.TimeoutError from None**
**TimeoutError**
**During handling of the above exception, another exception occurred:**
**Traceback (most recent call last):**
** File "/usr/local/lib/python3.11/site-packages/jupyterhub/app.py", line 3350, in launch_instance**
** loop.start()**
** File "/usr/local/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 215, in start**
** self.asyncio_loop.run_forever()**
** File "/usr/local/lib/python3.11/asyncio/base_events.py", line 607, in run_forever**
** self._run_once()**
** File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once**
** handle._run()**
** File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run**
** self._context.run(self._callback, *self._args)**
** File "/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py", line 2423, in catch_reflector_start**
** sys.exit(1)**
**SystemExit: 1**
**Task was destroyed but it is pending!**
**task: <Task pending name='Task-248' coro=<RequestHandler._execute() running at /usr/local/lib/python3.11/site-packages/tornado/web.py:1713> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[_HandlerDelegate.execute.<locals>.<lambda>() at /usr/local/lib/python3.11/site-packages/tornado/web.py:2361]>**
I am not able to understand the possible root cause of this behaviour so that I could fix this. I am quite new to this setup. Any help would be greatly appreciated.