I'm using service fabric on premisse with my micro services and I adopted the strategy of using dynamic ports, but apparently I think I've narrowed the range of ports because I've reached the limit of 25 applications with approximately 340 microservices in steless. and when trying to upload a new application it error in almost all services. if you remove an old one for example the application that was giving error goes up and stays stable. I have already increased the port range in clustermanifest in the parameter: ApplicationEndpoints but did not have effect ...
2 Answers
I am not 100% sure whether the issue you have is about available ports but if it is - can you check this documentation section?
FROM DOCS:
ephemeralPorts override the dynamic ports used by the OS. Service Fabric uses a part of these ports as application ports, and the remaining are available for the OS. It also maps this range to the existing range present in the OS, so for all purposes, you can use the ranges given in the sample JSON files. Make sure that the difference between the start and the end ports is at least 255. You might run into conflicts if this difference is too low, because this range is shared with the OS. To see the configured dynamic port range, run netsh int ipv4 show dynamicport tcp.
applicationPorts are the ports that are used by the Service Fabric applications. The application port range should be large enough to cover the endpoint requirement of your applications. This range should be exclusive from the dynamic port range on the machine, that is, the ephemeralPorts range as set in the configuration. Service Fabric uses these ports whenever new ports are required and takes care of opening the firewall for these ports.
These settings are configured for each nodeType
in the cluster configuration.
In the ClusterManifest.xml
(based on ClusterManifestType XML Schema) these settings are represented by ApplicationEndpoints
and EphemeralEndpoints
elements within NodeType
element.

- 1
- 1

- 959
- 6
- 17
-
if you observe my range ports: 20001, 45031. but even increased did not effect, applications continue to go up with error. – FernandoLopes Jan 28 '19 at 12:18
-
I have added a bit more information to the answer. Can you try to configure the `EphemeralEndpoints` element in the NodeType as well as `ApplicationEndpoints `? – Oleg Karasik Jan 28 '19 at 13:40
<ClusterManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="PmenosProducao" Version="0" Description="This is a generated file. Do not modify." xmlns="http://schemas.microsoft.com/2011/01/fabric">
<NodeTypes>
<NodeType Name="NodeType0">
<Endpoints>
<ClientConnectionEndpoint Port="19000" />
<LeaseDriverEndpoint Port="19002" />
<ClusterConnectionEndpoint Port="19001" />
<HttpGatewayEndpoint Port="19080" Protocol="http" />
<HttpApplicationGatewayEndpoint Port="19081" Protocol="http" />
<ServiceConnectionEndpoint Port="19003" />
<ApplicationEndpoints StartPort="20001" EndPort="45031" />
</Endpoints>
<PlacementProperties>
<Property Name="NodeTypeName" Value="NodeType0" />
</PlacementProperties>
</NodeType>
</NodeTypes>
<Infrastructure>
<WindowsServer>
<NodeList>
<Node NodeName="name" IPAddressOrFQDN="0.0.0.0" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/dc2/r0" UpgradeDomain="UD1" />
<Node NodeName="name" IPAddressOrFQDN="0.0.0.0" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/dc3/r0" UpgradeDomain="UD2" />
<Node NodeName="name" IPAddressOrFQDN="0.0.0.0" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/dc1/r0" UpgradeDomain="UD0" />
</NodeList>
</WindowsServer>
</Infrastructure>
<FabricSettings>
<Section Name="ApplicationGateway/Http">
<Parameter Name="DefaultHttpRequestTimeout" Value="600" />
<Parameter Name="IsEnabled" Value="true" />
</Section>
<Section Name="ClusterManager">
<Parameter Name="EnableAutomaticBaseline" Value="True" />
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="Common">
<Parameter Name="EnableEndpointV2" Value="True" />
</Section>
<Section Name="Diagnostics">
<Parameter Name="ClusterId" Value="bb99d580-50cc-4e1c-8a45-09f02f091f73" />
<Parameter Name="ConsumerInstances" Value="FileShareWinFabEtw, FileShareWinFabCrashDump, FileShareWinFabPerfCtr" />
<Parameter Name="EnableTelemetry" Value="False" />
<Parameter Name="MaxDiskQuotaInMB" Value="5120" />
<Parameter Name="ProducerInstances" Value="WinFabEtlFile, WinFabCrashDump, WinFabPerfCtrFolder" />
</Section>
<Section Name="FailoverManager">
<Parameter Name="ExpectedClusterSize" Value="3" />
<Parameter Name="IsSingletonReplicaMoveAllowedDuringUpgrade" Value="True" />
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="FaultAnalysisService">
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="Federation">
<Parameter Name="NodeIdGeneratorVersion" Value="V4" />
</Section>
<Section Name="FileShareWinFabCrashDump">
<Parameter Name="ConsumerType" Value="FileShareFolderUploader" />
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerInstance" Value="WinFabCrashDump" />
<Parameter Name="StoreConnectionString" Value="c:\ProgramData\SF\DiagnosticsStore\fabricdumps-bb99d580-50cc-4e1c-8a45-09f02f091f73" />
</Section>
<Section Name="FileShareWinFabEtw">
<Parameter Name="ConsumerType" Value="FileShareEtwCsvUploader" />
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerInstance" Value="WinFabEtlFile" />
<Parameter Name="StoreConnectionString" Value="c:\ProgramData\SF\DiagnosticsStore\fabriclogs-bb99d580-50cc-4e1c-8a45-09f02f091f73" />
</Section>
<Section Name="FileShareWinFabPerfCtr">
<Parameter Name="ConsumerType" Value="FileShareFolderUploader" />
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerInstance" Value="WinFabPerfCtrFolder" />
<Parameter Name="StoreConnectionString" Value="c:\ProgramData\SF\DiagnosticsStore\fabricperf-bb99d580-50cc-4e1c-8a45-09f02f091f73" />
</Section>
<Section Name="FileStoreService">
<Parameter Name="AnonymousAccessEnabled" Value="false" />
<Parameter Name="PrimaryAccountNTLMPasswordSecret" Value="8d9a2358-d8b7-4e55-8979-fbc3cde08551" />
<Parameter Name="PrimaryAccountType" Value="LocalUser" />
<Parameter Name="SecondaryAccountNTLMPasswordSecret" Value="bcac0708-43f8-4c86-875c-a26a939bdaa0" />
<Parameter Name="SecondaryAccountType" Value="LocalUser" />
</Section>
<Section Name="Hosting">
<Parameter Name="EndpointProviderEnabled" Value="true" />
<Parameter Name="FirewallPolicyEnabled" Value="true" />
<Parameter Name="RunAsPolicyEnabled" Value="true" />
</Section>
<Section Name="HttpGateway">
<Parameter Name="IsEnabled" Value="true" />
</Section>
<Section Name="ImageStoreService">
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="Management">
<Parameter Name="ImageStoreConnectionString" Value="fabric:ImageStore" />
</Section>
<Section Name="NamingService">
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="PlacementAndLoadBalancing">
<Parameter Name="QuorumBasedReplicaDistributionPerFaultDomains" Value="true" />
<Parameter Name="QuorumBasedReplicaDistributionPerUpgradeDomains" Value="true" />
</Section>
<Section Name="ReconfigurationAgent">
<Parameter Name="IsDeactivationInfoEnabled" Value="true" />
</Section>
<Section Name="Security">
<Parameter Name="AllowDefaultClient" Value="False" />
<Parameter Name="ClientRoleEnabled" Value="true" />
<Parameter Name="ClusterCredentialType" Value="None" />
<Parameter Name="DisableFirewallRuleForDomainProfile" Value="false" />
<Parameter Name="DisableFirewallRuleForPrivateProfile" Value="false" />
<Parameter Name="DisableFirewallRuleForPublicProfile" Value="false" />
<Parameter Name="ServerAuthCredentialType" Value="None" />
</Section>
<Section Name="Setup">
<Parameter Name="FabricDataRoot" Value="C:\ProgramData\SF" />
<Parameter Name="FabricLogRoot" Value="C:\ProgramData\SF\Log" />
</Section>
<Section Name="Trace/Etw">
<Parameter Name="Level" Value="4" />
</Section>
<Section Name="UpgradeOrchestrationService">
<Parameter Name="AutoupgradeEnabled" Value="False" />
<Parameter Name="AutoupgradeInstallEnabled" Value="False" />
<Parameter Name="ClusterId" Value="bb99d580-50cc-4e1c-8a45-09f02f091f73" />
<Parameter Name="GoalStateExpirationReminderInDays" Value="30" />
<Parameter Name="MinReplicaSetSize" Value="3" />
<Parameter Name="PlacementConstraints" Value="NodeTypeName==NodeType0" />
<Parameter Name="TargetReplicaSetSize" Value="3" />
</Section>
<Section Name="WinFabCrashDump">
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="FolderType" Value="WindowsFabricCrashDumps" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerType" Value="FolderProducer" />
</Section>
<Section Name="WinFabEtlFile">
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerType" Value="EtlFileProducer" />
</Section>
<Section Name="WinFabPerfCtrFolder">
<Parameter Name="DataDeletionAgeInDays" Value="7" />
<Parameter Name="FolderType" Value="WindowsFabricPerformanceCounters" />
<Parameter Name="IsEnabled" Value="true" />
<Parameter Name="ProducerType" Value="FolderProducer" />
</Section>
</FabricSettings>
</ClusterManifest>

- 151
- 7