wait_tasks exceptions.ServiceException: (500) socket hang up
还没有人认领这个 Issue。
评估
调研方向
Start at cloudtower/utils.py in wait_tasks and trace the get_tasks call through api/task_api.py, api_client.py, and rest.py. Determine where transient socket hang-up failures could be retried and how backoff limits should be exposed. Done means the requested retry behavior is defined and verified for repeated get_tasks failures.
由索引模型根据 Issue 内容生成。
描述
wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id],client)
当我们调用wait_tasks,经常出现:
Traceback (most recent call last):
File "O:/mywork/mywork/mywork/mypy/myvsphere2/cloud/set-user-from-cmdb.py", line 705, in
main()
File "O:/mywork/mywork/mywork/mypy/myvsphere2/cloud/set-user-from-cmdb.py", line 691, in main
set_user_form_smartx(vc_ip)
File "O:/mywork/mywork/mywork/mypy/myvsphere2/cloud/set-user-from-cmdb.py", line 601, in set_user_form_smartx
wait_tasks([with_task_obj.task_id for with_task_obj in resp if with_task_obj.task_id],client)
File "D:\Python3.74\lib\site-packages\cloudtower\utils.py", line 76, in wait_tasks
id_in=ids
File "D:\Python3.74\lib\site-packages\cloudtower\api\task_api.py", line 209, in get_tasks
return self.get_tasks_with_http_info(get_tasks_request_body, **kwargs) # noqa: E501
File "D:\Python3.74\lib\site-packages\cloudtower\api\task_api.py", line 330, in get_tasks_with_http_info
_request_auth=local_var_params.get('_request_auth'))
File "D:\Python3.74\lib\site-packages\cloudtower\api_client.py", line 380, in call_api
_request_auth)
File "D:\Python3.74\lib\site-packages\cloudtower\api_client.py", line 191, in __call_api
raise e
File "D:\Python3.74\lib\site-packages\cloudtower\api_client.py", line 188, in __call_api
_request_timeout=_request_timeout)
File "D:\Python3.74\lib\site-packages\cloudtower\api_client.py", line 424, in request
body=body)
File "D:\Python3.74\lib\site-packages\cloudtower\rest.py", line 267, in POST
body=body)
File "D:\Python3.74\lib\site-packages\cloudtower\rest.py", line 218, in request
raise ServiceException(http_resp=r)
cloudtower.exceptions.ServiceException: (500)
Reason: Internal Server Error
HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 25 Sep 2025 09:03:15 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '671', 'Connection': 'keep-alive', 'Vary': 'Origin', 'x-tower-request-id': 'XxdA5NiavZC2NDm6arUnA'})
HTTP response body: {"path":"/get-tasks","status":500,"message":"request to http://cloudtower-cloudtower.cloudtower-system.svc.cluster.local.:8800/ failed, reason: socket hang up","stack":"FetchError: request to http://cloudtower-cloudtower.cloudtower-system.svc.cluster.local.:8800/ failed, reason: socket hang up\n at ClientRequest. (/app/node_modules/node-fetch/lib/index.js:1501:11)\n at ClientRequest.emit (node:events:518:28)\n at Socket.socketOnEnd (node:_http_client:524:9)\n at Socket.emit (node:events:530:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"}
请如如何增加backoffretry,可以给出示例吗?
- 主要语言
- Python
- 星标
- 5
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
smartxworks/cloudtower-python-sdk 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
smartxworks/cloudtower-python-sdk#43 · 1 条评论 ·
查看 smartxworks/cloudtower-python-sdk 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 70/100
huggingface/Repo2RLEnv#163 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
难度 2/5 1-3 小时 新手友好度 70/100
NousResearch/hermes-agent#121143 ·