flower框架gRPC无法连接的问题

根据别人代码,server的地址一般是[::]:8080或者0.0.0.0:8080

实际Flower1.0以后地址要写为127.0.0.0:8080

报错为:

Traceback (most recent call last):
  File "/home/paul/Research/flower_cv/client.py", line 31, in <module>
    fl.client.start_client(server_address="[::]:8080", client=ObjectDetectionClient())
  File "/home/paul/Research/flower_cv/venv/lib/python3.11/site-packages/flwr/client/app.py", line 248, in start_client
    _start_client_internal(
  File "/home/paul/Research/flower_cv/venv/lib/python3.11/site-packages/flwr/client/app.py", line 361, in _start_client_internal
    message = receive()
              ^^^^^^^^^
  File "/home/paul/Research/flower_cv/venv/lib/python3.11/site-packages/flwr/client/grpc_client/connection.py", line 132, in receive
    proto = next(server_message_iterator)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/paul/Research/flower_cv/venv/lib/python3.11/site-packages/grpc/_channel.py", line 540, in __next__
    return self._next()
           ^^^^^^^^^^^^
  File "/home/paul/Research/flower_cv/venv/lib/python3.11/site-packages/grpc/_channel.py", line 966, in _next
    raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::%5D:8080: Failed to connect to remote host: Connection refused"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2024-02-15T12:42:51.805677812-06:00", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv6:%5B::%5D:8080: Failed to connect to remote host: Connection refused"}"

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值