azure-service-fabricservice-fabric-stateless

Azure Service Fabric - Failed to bind to address address already in use


I get the following error when running a basic Stateless Service (out of the box template with WeatherForecastController) on a local (again fresh and out of the box) azure fabric cluster. The same error shows for 4 of the 5 nodes (only Node4 does not have the error) despite the app only running on node 2.

Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus', HealthState='Warning', ConsiderWarningAsError=false. Replica had multiple failures during open on _Node_1. API call: IStatelessServiceInstance.Open(); Error = System.IO.IOException (-2146232800) Failed to bind to address http://[::]:8390: address already in use.

I have tried changing the ipaddress in the ServiceManifest.xml but just get the same error again.

What on earth is going on?


Solution

  • Your local dev cluster runs on one machine, the first service replica claims the port. If the others cannot share the port, so they fail to start.

    To solve this, either:

    More info here.