@manics We are utilizing the latest version (version=1.0.0-0.dev.git.3350.he7995d6) of BinderHub helm chart.
As suggested, debug logging is enabled on JupyterHub.
For BinderHub, in technical reference (app — BinderHub documentation), there is an option to enable debug logging, can you help how it can utilized in helm chart. I tested with following config, but helm upgrade is failing.
extraConfig:
c.BinderHub.debug = True
Below are the logs from hub pod when we try to build - binder-examples/conda.git
[D 2023-11-17 23:27:56.390 JupyterHub reflector:374] pods watcher timeout
[D 2023-11-17 23:27:56.391 JupyterHub reflector:289] Connecting pods watcher
[D 2023-11-17 23:27:57.087 JupyterHub scopes:877] Checking access to /hub/api/users/binder-examples-conda-eajqhpde via scope admin:users
[D 2023-11-17 23:27:57.088 JupyterHub scopes:677] Unrestricted access to /hub/api/users/binder-examples-conda-eajqhpde via admin:users
[D 2023-11-17 23:27:57.088 JupyterHub roles:281] Assigning default role to User binder-examples-conda-eajqhpde
[I 2023-11-17 23:27:57.090 JupyterHub roles:238] Adding role user for User: binder-examples-conda-eajqhpde
[I 2023-11-17 23:27:57.099 JupyterHub log:191] 201 POST /hub/api/users/binder-examples-conda-eajqhpde (binder@xx.xx.xx) 15.64ms
[D 2023-11-17 23:27:57.104 JupyterHub scopes:877] Checking access to /hub/api/users/binder-examples-conda-eajqhpde/servers/ via scope servers
[D 2023-11-17 23:27:57.104 JupyterHub scopes:677] Unrestricted access to /hub/api/users/binder-examples-conda-eajqhpde/servers/ via servers
[D 2023-11-17 23:27:57.105 JupyterHub user:431] Creating <class ‘BinderSpawner’> for binder-examples-conda-eajqhpde:
[D 2023-11-17 23:27:57.106 JupyterHub base:961] Initiating spawn for binder-examples-conda-eajqhpde
[D 2023-11-17 23:27:57.106 JupyterHub base:965] 0/64 concurrent spawns
[D 2023-11-17 23:27:57.106 JupyterHub base:970] 0 active servers
[I 2023-11-17 23:27:57.119 JupyterHub provider:659] Creating oauth client jupyterhub-user-binder-examples-conda-eajqhpde
[D 2023-11-17 23:27:57.132 JupyterHub user:794] Calling Spawner.start for binder-examples-conda-eajqhpde
[D 2023-11-17 23:27:57.132 JupyterHub spawner:3199] Applying KubeSpawner override for profile ‘Test Notebook’
[D 2023-11-17 23:27:57.132 JupyterHub spawner:3177] … overriding KubeSpawner value cpu_limit=None
[D 2023-11-17 23:27:57.132 JupyterHub spawner:3177] … overriding KubeSpawner value mem_limit=None
[D 2023-11-17 23:27:57.132 JupyterHub spawner:3177] … overriding KubeSpawner value cpu_guarantee=0.013
[D 2023-11-17 23:27:57.132 JupyterHub spawner:3177] … overriding KubeSpawner value mem_guarantee=0.904G
[I 2023-11-17 23:27:57.132 JupyterHub log:191] 202 POST /hub/api/users/binder-examples-conda-eajqhpde/servers/ (binder@xx.xx.xx.xx) 31.34ms
[E 2023-11-17 23:27:57.133 JupyterHub user:884] Unhandled error starting binder-examples-conda-eajqhpde’s server: ‘port’
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/jupyterhub/user.py”, line 798, in spawn
url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2697, in _start
pod = await self.get_pod_manifest()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2003, in get_pod_manifest
env=self.get_env(), # Expansion is handled by get_env
^^^^^^^^^^^^^^
File “”, line 104, in get_env
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2161, in get_env
env.update(self._expand_all(self.environment))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1836, in _expand_all
return {k: self._expand_all(v) for k, v in src.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1836, in
return {k: self._expand_all(v) for k, v in src.items()}
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1838, in _expand_all
return self._expand_user_properties(src)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1816, in _expand_user_properties
rendered = template.format(
^^^^^^^^^^^^^^^^
KeyError: ‘port’
[D 2023-11-17 23:27:57.133 JupyterHub user:982] Stopping binder-examples-conda-eajqhpde
[D 2023-11-17 23:27:57.136 JupyterHub user:1002] Deleting oauth client jupyterhub-user-binder-examples-conda-eajqhpde
[D 2023-11-17 23:27:57.140 JupyterHub user:1005] Finished stopping binder-examples-conda-eajqhpde
[C 2023-11-17 23:27:57.149 JupyterHub base:1064] Aborting due to 5 consecutive spawn failures
[E 2023-11-17 23:27:57.149 JupyterHub gen:630] Exception in Future <Task finished name=‘Task-2745’ coro=<BaseHandler.spawn_single_user..finish_user_spawn() done, defined at /usr/local/lib/python3.11/site-packages/jupyterhub/handlers/base.py:981> exception=KeyError(‘port’)> after timeout
Traceback (most recent call last):
File “/usr/local/lib/python3.11/site-packages/tornado/gen.py”, line 625, in error_callback
future.result()
File “/usr/local/lib/python3.11/site-packages/jupyterhub/handlers/base.py”, line 988, in finish_user_spawn
await spawn_future
File “/usr/local/lib/python3.11/site-packages/jupyterhub/user.py”, line 902, in spawn
raise e
File “/usr/local/lib/python3.11/site-packages/jupyterhub/user.py”, line 798, in spawn
url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2697, in _start
pod = await self.get_pod_manifest()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2003, in get_pod_manifest
env=self.get_env(), # Expansion is handled by get_env
^^^^^^^^^^^^^^
File “”, line 104, in get_env
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 2161, in get_env
env.update(self._expand_all(self.environment))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1836, in _expand_all
return {k: self._expand_all(v) for k, v in src.items()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1836, in
return {k: self._expand_all(v) for k, v in src.items()}
^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1838, in _expand_all
return self._expand_user_properties(src)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/kubespawner/spawner.py”, line 1816, in _expand_user_properties
rendered = template.format(
^^^^^^^^^^^^^^^^
KeyError: ‘port’
[D 2023-11-17 23:27:57.153 JupyterHub scopes:877] Checking access to /hub/api/users/binder-examples-conda-eajqhpde/server/progress via scope read:servers
[D 2023-11-17 23:27:57.153 JupyterHub scopes:677] Unrestricted access to /hub/api/users/binder-examples-conda-eajqhpde/server/progress via read:servers
[I 2023-11-17 23:27:57.154 JupyterHub log:191] 200 GET /hub/api/users/binder-examples-conda-eajqhpde/server/progress (binder@xx.xx.xx.xx) 4.14ms
[D 2023-11-17 23:27:57.183 JupyterHub reflector:374] events watcher timeout
[D 2023-11-17 23:27:57.183 JupyterHub reflector:289] Connecting events watcher
[D 2023-11-17 23:27:58.262 JupyterHub log:191] 200 GET /hub/health (@xx.xx.xx.xx) 0.40ms
Task was destroyed but it is pending!
task: <Task pending name=‘Task-1437’ coro=<shared_client..close_client_task() running at /usr/local/lib/python3.11/site-packages/kubespawner/clients.py:58> wait_for=>
Exception ignored in: <coroutine object shared_client..close_client_task at 0x7fc4ca125300>
RuntimeError: coroutine ignored GeneratorExit
Below are the logs from binder pod and UI respectively:
[I 231117 23:27:57 launcher:197] Creating user binder-examples-conda-eajqhpde for image redacted/binderhub/binder-dev-binder-2dexamples-2dconda-8677da:f00a783146e9c6a2ed9726f01fc09fbfbad2f89e
[I 231117 23:27:57 launcher:257] Starting server for user binder-examples-conda-eajqhpde with image redacted/binderhub/binder-dev-binder-2dexamples-2dconda-8677da:f00a783146e9c6a2ed9726f01fc09fbfbad2f89e
[W 231117 23:27:57 web:1869] 500 GET /build/gh/binder-examples/conda.git/HEAD (10.42.2.0): Spawn failed: ‘port’
===
Found built image, launching…
Launching server…
Server requested
Spawn failed: ‘port’
Launch attempt 1 failed, retrying…
Spawn failed: ‘port’
Launch attempt 2 failed, retrying…
Spawn failed: ‘port’
Launch attempt 3 failed, retrying…
Spawn failed: ‘port’
Spawn failed: ‘port’