Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

wait_tasks exceptions.ServiceException: (500) socket hang up

Open
#44 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
Python
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from smartxworks/cloudtower-python-sdk

All issues in smartxworks/cloudtower-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.