1
votes

I’m playing with Microsoft Azure Service Fabric, but I'm having some problems reaching the services from internet.

My situation:

  • I Created the Service Fabric cluster:
    • Windows Server 2016 Datacenter.
    • Node type count: 1.
    • Custom Endpoint: empty.
    • “Enable reverse proxy” flagged.
  • All my services are developed base on .NET Core 2.1, REST API.

Using a web browser, all the services work fine locally (with Service Fabric Local Cluster and Azure Storage Emulator or Azure Storage). Then I published the application to the Azure cluster but I can not reach any of the service from internet.

Question

How can I setup the environment so to reach the services from internet?

I read some docs:

One of the service in the ServiceMnifest.xml file has the following configuration:

<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="8939" />

So, I added the following configurations in the load balancer:

  • Health probes: added a configuration for the 8939 port.
  • Load balancing rules: added a configuration for an 8939 => 8939 TCP passthrough using the previous health probes configuration.

But when I try to reach it from browser I get a timeout.

Any suggestion is appreciated.

Regards,

Attilio

2
Did you try to reach your API by reverse proxy address http://[FQDN]:[ReversPoxyPort]/[ApplicationName]/[ServiceName]/[Controller] ?SteppingRazor

2 Answers

1
votes

So if you have the reverse proxy enabled, and want to use that the endpoint on port 8939 is not interesting as you should access the reverse proxy using the proxy url

As pointed out in the comments the format is http://[FQDN]:[ReversPoxyPort]/[ApplicationName]/[ServiceName]/[Controller] and typically the port is 19081 so the url becomes something like myawesomeservicefabric.westeurope.cloudapp.azure.com:19081/FabricApp1/Service1/Values

As with all other things the port should be configured in the load balancer with a probe and a rule.

I am not sure what the portal does with clusters now a days, but at some point it configured a network security group which might also be the cause of your issues.

0
votes
  • RDP into the machine and test the endpoint on localhost. If it doesn't work, it's likely an application error.
  • Verify the firewall settings, for a rule for incoming traffic on port 8939.

  • Enable logging on the Azure Load Balancer to see if the health probe detects the endpoint.