delta-mpc/delta-node

Not enough clients in select candidates [bug]

aybh9 opened this issue · 2 comments

aybh9 commented

Describe the bug
Not enough clients in select candidates

To Reproduce
手动搭建了一个3个节点的无区块链的网络,运行示例任务失败
查看节点日志显示错误为not enough clients in select candidates

Screenshots
图片

图片

完整错误日志如下:

[2022-03-17 02:39:02 +0000] [1] [ERROR] Error in ASGI Framework
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/hypercorn/asyncio/task_group.py", line 21, in _handle
    await invoke_asgi(app, scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/hypercorn/utils.py", line 247, in invoke_asgi
    await app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 208, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/usr/local/lib/python3.8/site-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 64, in app
    await response(scope, receive, send)
  File "/usr/local/lib/python3.8/site-packages/starlette/responses.py", line 142, in __call__
    await self.background()
  File "/usr/local/lib/python3.8/site-packages/starlette/background.py", line 35, in __call__
    await task()
  File "/usr/local/lib/python3.8/site-packages/starlette/background.py", line 18, in __call__
    await self.func(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/delta_node/app/v1/task.py", line 57, in run_task
    await coord.run_task(task_id)
  File "/usr/local/lib/python3.8/site-packages/delta_node/coord/run.py", line 22, in run_task
    await _run_task(task)
  File "/usr/local/lib/python3.8/site-packages/delta_node/coord/run.py", line 12, in _run_task
    await horizontal.run_task(task)
  File "/usr/local/lib/python3.8/site-packages/delta_node/coord/horizontal.py", line 50, in run_task
    await run_task_round(alg, node_address, task_id, round)
  File "/usr/local/lib/python3.8/site-packages/delta_node/coord/horizontal.py", line 115, in run_task_round
    await select_candidates(alg, node_address, task_id, round)
  File "/usr/local/lib/python3.8/site-packages/delta_node/coord/horizontal.py", line 143, in select_candidates
    raise ValueError("not enough clients in select candidates")
ValueError: not enough clients in select candidates
2022-03-17 02:39:02.138 - horizontal.py[line:61] - ERROR: task 0x965bc9bf16edb92b2544258377c833a947de6da3b5cbed8632762f539de3e6a8 error

Might because the WebSocket stopped working so that no client is joining the task. Still needs further investigation @mh739025250

是docker-compose启动了很长时间之后,提交任务,才出现这种情况的吗?还是一启动提交任务就出现这种情况?
可以先尝试重启一下,docker-compose restart

如果是启动很长时间之后才出现这种情况,那这是一个已知的bug,预计会在下版本解决。