Flower Deployment Engine: "This request should be sent to a different service." when running local-deployment

Description:
I’m trying to run a Flower federated learning app using the Deployment Engine on a single machine, following the official how-to guide. My setup:

  • SuperLink:
    Started with
    flower-superlink --insecure --fleet-api-address "127.0.0.1:18443"
  • SuperNode 0:
    flower-supernode --insecure --superlink 127.0.0.1:18443 --clientappio-api-address 127.0.0.1:9094 --node-config "partition-id=0 num-partitions=2"
  • SuperNode 1:
    flower-supernode --insecure --superlink 127.0.0.1:18443 --clientappio-api-address 127.0.0.1:9095 --node-config "partition-id=1 num-partitions=2"
  • pyproject.toml:

[tool.flwr.federations.local-deployment]

address = “127.0.0.1:18443”

insecure = true

  • App launch:
    flwr run . local-deployment --stream

Problem:
When I run the last command, I get this error:

<_InactiveRpcError of RPC that terminated with:

status = StatusCode.FAILED_PRECONDITION

details = “This request should be sent to a different service.”

debug_error_string = “UNKNOWN:Error received from peer {grpc_message:“This request should be sent to a different service.”, grpc_status:9, …}”

SuperLink logs show both SuperNodes connect successfully and repeatedly pull messages, but the Flower server never seems to connect properly.

What I’ve checked:

  • All ports are correct and not blocked by firewall.
  • No port conflicts.
  • All processes are started in the correct order.
  • All components use the same Python environment and dependencies.

What could be causing this error, and how can I get the Flower app to run successfully with the Deployment Engine?

1 Like

Someone help me pls, i really need to fix it today

Hey @khoa2795 , you almost got it right! While your launch commands for the SuperLink and SuperNode are correct (you chose a different port than the default :9092), your SuperLink is still using the default :9093 port for the ExecAPI (which is the interface used for all the CLI commands, including flwr run).

Therefore, you need to keep your address = “127.0.0.1:9093” in your pyproject.toml. If you want to change this port, you first need to start the SuperLink passing the argument --exec-api-address.

I hope this helps!