Azure Service Fabric open port

185 views Asked by At

I have a Stateless Service Fabric application that opens port 13000 for TCP connections. The project locally works fine. I have created a Managed Azure Service Fabric and publish the project. I have allowed TCP connection at port 13000 at Networking tab but, when I try to connect, I am getting connection timeout. I have also created a http listener at port 8001 just for testing which I also allowed at networking tab and it also gets timeout error.

 "loadBalancingRules": [
                {
                    "frontendPort": 13000,
                    "backendPort": 13000,
                    "protocol": "tcp",
                    "probeProtocol": "tcp"
                },
                {
                    "frontendPort": 8001,
                    "backendPort": 8001,
                    "protocol": "tcp",
                    "probeProtocol": "http",
                    "probeRequestPath": "\\"
                },

Should I configure anything else in order those ports to be public available (ex. Network Security Group, Load balancer)

1

There are 1 answers

0
Kartik Bhiwapurkar On

• I tried to deploy a sample ‘Voting’ stateless fabric application to Azure as shown below and tried to access it with the below settings done in the load balancer and the NSG associated with the virtual network in which the related virtual machines and the resources are deployed in the cluster.

Azure Service Fabric cluster

I configured the virtual network with below settings and the NSG with the following configurations to allow the accessibility of the ‘Voting’ stateless application through the configured port: -

Virtual network address space: 172.16.0.0/20
Service Fabric subnet address space: 172.16.2.0/23

The following inbound traffic rules are enabled in the ‘Microsoft.Network/networkSecurityGroups’ resource: -

ClientConnectionEndpoint (TCP): 19000
HttpGatewayEndpoint (HTTP/TCP): 19080
SMB: 445
Internodecommunication: 1025, 1026, 1027
Ephemeral port range: 49152 to 65534 (need a minimum of 256 ports).
Ports for application use: 80 and 443
Application port range: 49152 to 65534 (used for service to service communication. Other ports aren't opened on the Load balancer).
Block all other ports

Similarly, if other application ports are needed, you'll need to adjust the ‘Microsoft.Network/loadBalancers’ resource and the ‘Microsoft.Network/networkSecurityGroups’ resource to allow the traffic in.

NSG Configuration

For more information regarding it, please refer to the below link as follows: -

https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-tutorial-create-vnet-and-windows-cluster