Environment:
AKS
Nginx for reverse proxy(ingress)
After enabling subdomain by following this doc: Security — Zero to JupyterHub with Kubernetes documentation got 500 : Internal Server Error
Redirect loop detected. Notebook has jupyterhub version unknown (likely < 0.8), but the Hub expects 4.1.5. Try installing jupyterhub==4.1.5 in the user environment if you continue to have problems.
Noticing two issue:
1.After server starting re-directing to login page.
Hub logs:
[I 2025-12-03 00:36:55.217 JupyterHub users:776] Server ram is ready
[I 2025-12-03 00:36:55.218 JupyterHub log:192] 200 GET /hub/api/users/ram/server/progress?_xsrf=[secret] 15375.45ms
[D 2025-12-03 00:36:55.953 JupyterHub scopes:884] Checking access to /hub/spawn-pending/ram via scope servers
[D 2025-12-03 00:36:55.953 JupyterHub scopes:697] Argument-based access to /hub/spawn-pending/ram via servers
[I 2025-12-03 00:36:55.953 JupyterHub log:192] 302 GET /hub/spawn-pending/ram → https://ram.jupyerthubtest.net/user/ram/ 1.74ms
[I 2025-12-03 00:36:56.832 JupyterHub log:192] 302 GET /user/ram/ → /hub/user/ram/ (@10.244.0.18) 0.48ms
[D 2025-12-03 00:36:57.117 JupyterHub log:192] 200 GET /hub/health (@10.224.0.4) 0.45ms
[D 2025-12-03 00:36:57.368 JupyterHub log:192] 200 GET /hub/health (@10.224.0.4) 0.47ms
[I 2025-12-03 00:36:57.443 JupyterHub log:192] 302 GET /hub/user/ram/ → /hub/login?next=%2Fhub%2Fuser%2Fram%2F (@10.244.0.18) 0.50ms
[I 2025-12-03 00:36:58.132 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b’0a0e5eac9b554b8981b83f38a3a1e5db:C_Cyx0FzVo94PJJCmxNT52gMdYPTp8Wh1nR0fi2Bp78=’ {‘path’: ‘/hub/’, ‘max_age’: 3600}
[I 2025-12-03 00:36:58.133 JupyterHub log:192] 200 GET /hub/login?next=%2Fhub%2Fuser%2Fram%2F (@10.244.0.18) 1.64ms
[D 2025-12-03 00:36:58.835 JupyterHub log:192] 200 GET /hub/static/components/jquery/dist/jquery.min.js?v=bf6089ed4698cb8270a8b0c8ad9508ff886a7a842278e98064d5c1790ca3a36d5d69d9f047ef196882554fc104da2c88eb5395f1ee8cf0f3f6ff8869408350fe (@10.244.0.18) 0.67ms
[D 2025-12-03 00:36:58.881 JupyterHub log:192] 200 GET /hub/static/css/style.min.css?v=01598a5386176f0279952a3b9632a07e7fce9a12aa53108973c83be9ec3473e7a59354876fab64bfeb01892eb503870183707aa03f207d7a94845ca7980c3819 (@10.244.0.18) 0.75ms
[D 2025-12-03 00:36:58.954 JupyterHub log:192] 200 GET /hub/static/components/bootstrap/dist/js/bootstrap.min.js?v=a014e9acc78d10a0a7a9fbaa29deac6ef17398542d9574b77b40bf446155d210fa43384757e3837da41b025998ebfab4b9b6f094033f9c226392b800df068bce (@10.244.0.18) 0.58ms
[D 2025-12-03 00:36:59.118 JupyterHub log:192] 200 GET /hub/health (@10.224.0.4) 0.40ms
[D 2025-12-03 00:36:59.202 JupyterHub log:192] 200 GET /hub/static/components/requirejs/require.js?v=bd1aa102bdb0b27fbf712b32cfcd29b016c272acf3d864ee8469376eaddd032cadcf827ff17c05a8c8e20061418fe58cf79947049f5c0dff3b4f73fcc8cad8ec (@10.244.0.18) 0.65ms
[D 2025-12-03 00:36:59.263 JupyterHub log:192] 200 GET /hub/logo (@10.244.0.18) 0.58ms
second issue:
after loggin with user “ram” getting
hub logs:
[I 2025-12-03 00:39:20.272 JupyterHub log:192] 302 GET /user/ram/?redirects=2 → /hub/user/ram/?redirects=2 (@10.244.0.18) 0.46ms
[D 2025-12-03 00:39:20.573 JupyterHub reflector:374] pods watcher timeout
[D 2025-12-03 00:39:20.573 JupyterHub reflector:289] Connecting pods watcher
[D 2025-12-03 00:39:20.841 JupyterHub reflector:374] events watcher timeout
[D 2025-12-03 00:39:20.841 JupyterHub reflector:289] Connecting events watcher
[D 2025-12-03 00:39:20.917 JupyterHub scopes:884] Checking access to /hub/user/ram/ via scope access:servers
[D 2025-12-03 00:39:20.917 JupyterHub scopes:697] Argument-based access to /hub/user/ram/ via access:servers
[W 2025-12-03 00:39:20.917 JupyterHub web:1873] 500 GET /hub/user/ram/?redirects=2 (10.244.0.18): Redirect loop detected. Notebook has jupyterhub version unknown (likely < 0.8), but the Hub expects 4.1.5. Try installing jupyterhub==4.1.5 in the user environment if you continue to have problems.
[D 2025-12-03 00:39:20.917 JupyterHub base:1471] No template for 500
[E 2025-12-03 00:39:20.918 JupyterHub log:184] {
“Cookie”: “jupyterhub-hub-login=[secret]; _xsrf=[secret]; jupyterhub-session-id=[secret]”,
“Priority”: “u=0, i”,
“Accept-Language”: “en-US,en;q=0.9”,
“Accept-Encoding”: “gzip, deflate, br, zstd”,
“Sec-Ch-Ua-Platform”: ““Windows””,
“Sec-Ch-Ua-Mobile”: “?0”,
“Sec-Ch-Ua”: ““Chromium”;v=“142”, “Microsoft Edge”;v=“142”, “Not_A Brand”;v=“99””,
“Sec-Fetch-Dest”: “document”,
“Sec-Fetch-User”: “?1”,
“Sec-Fetch-Mode”: “navigate”,
“Sec-Fetch-Site”: “same-origin”,
“Accept”: “text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0”,
“Upgrade-Insecure-Requests”: “1”,
“Cache-Control”: “max-age=0”,
“X-Scheme”: “https”,
“X-Forwarded-Scheme”: “https”,
“X-Forwarded-Proto”: “https, https,http”,
“X-Forwarded-Port”: “443,80”,
“X-Forwarded-For”: “157.58.216.98, 157.58.216.98,::ffff:10.244.1.190”,
“X-Real-Ip”: “157.58.216.98, 157.58.216.98”,
“X-Request-Id”: “1b60b0f15f760358556f69480a468e63”,
“Connection”: “keep-alive”
}
[E 2025-12-03 00:39:20.918 JupyterHub log:192] 500 GET /hub/user/ram/?redirects=2 2.73ms