我在微服务中优先使用服务结构,并且采用了使用动态端口的策略,但是显然我认为我缩小了端口范围,因为我已经达到了25个应用程序的极限(大约340个)微服务无处不在。尝试上传新的应用程序时,几乎所有服务都会出错。例如,如果您删除了旧的应用程序,则出现错误的应用程序将上升并保持稳定。我已经在clustermanifest参数中增加了端口范围:ApplicationEndpoints,但是没有效果...
答案 0 :(得分:0)
我不是100%不确定您的问题是否与可用端口有关,但是如果是-您可以检查此documentation section吗?
从DOCS:
ephemeralPorts 覆盖操作系统使用的动态端口。 Service Fabric将这些端口的一部分用作应用程序端口,其余的可用于OS。它还会将此范围映射到OS中存在的现有范围,因此出于所有目的,您可以使用示例JSON文件中给出的范围。确保起始端口和结束端口之间的差异至少为255。如果此差异太小,则可能会发生冲突,因为此范围是与OS共享的。要查看已配置的动态端口范围,请运行netsh int ipv4 show dynamicport tcp。
applicationPorts 是Service Fabric应用程序使用的端口。应用程序端口范围应足够大,以覆盖您的应用程序的端点要求。此范围应与计算机上的动态端口范围(即,配置中设置的ephemeralPorts范围)互斥。每当需要新端口时,Service Fabric都会使用这些端口,并负责为这些端口打开防火墙。
为集群配置中的每个nodeType
配置了这些设置。
在ClusterManifest.xml
(基于ClusterManifestType XML架构)中,这些设置由ApplicationEndpoints
元素内的EphemeralEndpoints
和NodeType
元素表示。
答案 1 :(得分:0)
<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>