Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

wait_tasks exceptions.ServiceException: (500) socket hang up

Đang mở
#44 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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,可以给出示例吗?

Ngôn ngữ chính
Python
Star
5
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của smartxworks/cloudtower-python-sdk

Tất cả issue của smartxworks/cloudtower-python-sdk

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.