Skip to content

cull_idle not being able to clean up because of HTTP: 403 Forbidden #3607

Open
@hnykda

Description

@hnykda

Bug description

Even though my chart has values:

cull:
  enabled: true

user hubs are not cleaned up. I am on chart v4.0.0, azure deployment. The problem is that culler can't seem to get to the hub API:

│ [I 2025-01-20 20:15:13.029 JupyterHub log:192] 200 POST /hub/api/users/jackwildman/activity ([email protected]) 15.16ms                                                                                                                                                                                                                                                   │
│ [I 2025-01-20 20:16:20.171 JupyterHub log:192] 200 GET /hub/api/ (jupyterhub-idle-culler@::1) 10.61ms                                                                                                                                                                                                                                                                            │
│ [W 2025-01-20 20:16:20.174 JupyterHub scopes:1019] Not authorizing access to /hub/api/users. Requires any of [list:users] on *, not derived from scopes []                                                                                                                                                                                                                       │
│ [W 2025-01-20 20:16:20.174 JupyterHub web:1873] 403 GET /hub/api/users?state=ready (::1): Action is not authorized with current scopes; requires any of [list:users]
│ [W 2025-01-20 20:16:20.174 JupyterHub log:192] 403 GET /hub/api/users?state=[secret] (jupyterhub-idle-culler@::1) 1.65ms                                                                                                                                                                                                                                                         │
│ [E 250120 20:16:20 ioloop:941] Exception in callback functools.partial(<function cull_idle at 0x7f41a330b6a0>, url='http://localhost:8081/hub/api', api_token='89f1f94b53c643bb8abbbbb4f9b27180bd87ead', inactive_limit=3600, cull_users=False, remove_named_servers=False, max_age=0, concurrency=10, ssl_enabled=False, internal_certs_location='internal-ssl', cull_admin_users=True │
│ , api_page_size=0, cull_default_servers=True, cull_named_servers=True)                                                                                                                                                                                                                                                                                                           │
│     Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                           │
│       File "/usr/local/lib/python3.12/site-packages/tornado/ioloop.py", line 939, in _run                                                                                                                                                                                                                                                                                        │
│         await val                                                                                                                                                                                                                                                                                                                                                                │
│       File "/usr/local/lib/python3.12/site-packages/jupyterhub_idle_culler/__init__.py", line 436, in cull_idle                                                                                                                                                                                                                                                                  │
│         async for user in fetch_paginated(req):                                                                                                                                                                                                                                                                                                                                  │
│       File "/usr/local/lib/python3.12/site-packages/jupyterhub_idle_culler/__init__.py", line 142, in fetch_paginated                                                                                                                                                                                                                                                            │
│         response = await resp_future                                                                                                                                                                                                                                                                                                                                             │
│                    ^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                             │
│       File "/usr/local/lib/python3.12/site-packages/jupyterhub_idle_culler/__init__.py", line 124, in fetch                                                                                                                                                                                                                                                                      │
│         return await client.fetch(req)                                                                                                                                                                                                                                                                                                                                           │
│                ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                                                                                                                                           │
│     tornado.httpclient.HTTPClientError: HTTP 403: Forbidden                                                                                                                                                                                                                                                                                                                      │
│ [I 2025-01-20 20:16:33.478 JupyterHub log:192] 200 GET /hub/api/user ([email protected]) 10.44ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions