我在 k8s 1.25 上使用 Jupyterhub 3.2.1 jupyter enterprise gateway 3.2.1,同时连接到 JEG 以列出和 spwan 远程内核,我收到以下错误。
Z [I 2024-01-10 13:17:31.189 ServerApp] 200 GET /user/jovyan/api/terminals?1704892657311 ([email protected]) 0.72ms
2024-01-10T13:18:22.192528667Z [I 2024-01-10 13:18:22.192 ServerApp] 200 GET /user/jovyan/api/me?1704892708321 ([电子邮件受保护]) 0.94ms 2024-01-10T13:18:22.764841954Z [I 2024-01-10 13:18:22.764 ServerApp] 101 GET /user/jovyan/api/events/subscribe?token=[秘密] ([电子邮件受保护]) 0.97毫秒 2024-01-10T13:19:29.995576942Z [E 2024-01-10 13:19:29.995 ServerApp] 错误消息 (TypeError('并非所有参数在字符串格式化期间转换')): {'name': 'ServerApp', 'msg': '尝试通过网关 URL 启动内核时出现异常 http://enterprise-gateway.enterprise-gateway.svc.cluster.local:8888 ,[Errno 110] 连接超时', 'args': ( TimeoutError(110, '连接超时'),), 'levelname': '错误', 'levelno': 40, 'pathname': '/usr/local/lib/python3.11/site-packages/jupyter_server/gateway /gateway_client.py'、'文件名':'gateway_client.py'、'模块':'gateway_client'、'exc_info':无、'exc_text':无、'stack_info':无、'lineno':812、'funcName ': 'gateway_request', '创建': 1704892769.9951384, '毫秒': 995.0, 'relativeCreated': 148853.8899421692, '线程': 140580579428160, 'threadName': 'MainThread', 'processName': 'Main过程','过程': 7} 2024-01-10T13:19:29.998097118Z [E 2024-01-10 13:19:29.995 ServerApp] 未捕获的异常 GET /user/jovyan/api/kernels?1704892645918 (127.0.0.1) 2024-01-10T13:19:29.998121127Z HTTPServerRequest(协议='https',主机='jupyter.xyz.com',方法='GET',uri='/user/jovyan/api/kernels?1704892645918',版本='HTTP/1.1',remote_ip='127.0.0.1') 2024-01-10T13:19:29.998125801Z 回溯(最近一次调用): 2024-01-10T13:19:29.998128775Z 文件“/usr/local/lib/python3.11/site-packages/tornado/web.py”,第 1786 行,在 _execute 中 2024-01-10T13:19:29.998139181Z 结果 = 等待结果 2024-01-10T13:19:29.998142001Z ^^^^^^^^^^^^^
单用户下 jupyterhub 3.2.1 helm 配置中的以下网络规则更改修复了问题
networkPolicy:
enabled: false