我在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 Files\Microsoft SDKs\Service
4>Fabric\Tools\PSModule\ServiceFabricSDK\Publish-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标签,一切都很好。我在做什么错了?
答案 0 :(得分:0)
SecondaryDefaultLoad的值必须为0或不显示。我不知道为什么...