根据别人代码,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"}"