Search code examples
azureazure-service-fabric

ERR_CONNECTION_TIMED_OUT when trying to access a Service Fabric service


I started to play with Service Fabric very recently. I added a new Service Fabric cluster on Azure (unsecure) and I created a demo solution with 2 stateless Web API Services as follows:

Service Fabric Demo Solution

Endpoint configuration for AnotherAPI is the following:

<Endpoints>
  <!-- This endpoint is used by the communication listener to obtain the port on which to 
       listen. Please note that if your service is partitioned, this port is shared with 
       replicas of different partitions that are placed in your code. -->
  <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="8698" />
</Endpoints>

I am able to access to the default controller (ValuesController) using the local endpoint:

http://localhost:8698/api/values

But when I try to use the azure endpoint I get an ERR_CONNECTION_TIMED_OUT error on Chrome.

http://{azure-ip-address}:8698/api/values

Is there anything that I am missing?


Solution

  • You have to open that port in your azure cluster via a Load Balancer Probe. You can do this at cluster creation time via ARM template or after the fact. For an existing cluster, go to the resource group, then the LB Balancer, then probes. The default open port in SF is 19080 though. If you just switch to that port it will work if you are not using SSL.