如果在服务清单中指定了 LoadMetric,则 Service Fabric 不会发布应用程序.xml



我已在ServiceManifest.xml中指定LoadMetric CommunicationCount:

<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="StatelessWcfNetPkg"
Version="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<StatelessServiceType ServiceTypeName="StatelessWcfNetType" >
<LoadMetrics>
<LoadMetric Name="ConnectionCount" DefaultLoad="1" SecondaryDefaultLoad="1" Weight="High"/>
</LoadMetrics>
</StatelessServiceType>
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ExeHost>
<Program>StatelessWcfNet.exe</Program>
</ExeHost>
</EntryPoint>
</CodePackage>
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<Endpoint Name="ServiceEndpoint" />
</Endpoints>
</Resources>
</ServiceManifest>

它是建立的,但通过发布我有一个错误:

4>Creating application...
4>New-ServiceFabricApplication : An error occurred during this operation.  Please check the trace logs for more details.
4>In C:Program FilesMicrosoft SDKsService 
4>FabricToolsPSModuleServiceFabricSDKPublish-NewServiceFabricApplication.ps1:358 Zeichen:9
4>+         New-ServiceFabricApplication -ApplicationName $ApplicationNam ...
4>+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4>    + CategoryInfo          : InvalidOperation: (Microsoft.Servi...usterConnection:ClusterConnection) [New-ServiceFabr 
4>   icApplication], FabricException
4>    + FullyQualifiedErrorId : CreateApplicationInstanceErrorId,Microsoft.ServiceFabric.Powershell.NewApplication
4> 

没有LoadMetric标记,一切都很好。我做错了什么?

SecondaryDefaultLoad的值必须为0,否则不应出现。我不知道为什么。。。

最新更新