[英]Orleans Specify SqlServer for Liveness
I am trying to setup a test environment for Orleans that uses SQL Server for liveness. 我正在尝试为奥尔良设置一个使用SQL Server实现的测试环境。 This is my server config file:
这是我的服务器配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<OrleansConfiguration xmlns="urn:orleans">
<Globals>
<Liveness LivenessType="SqlServer" DeploymentId="42783519-d64e-44c9-9c29-111111111133" DataConnectionString="Data Source=.\\SQLEXPRESS;Initial Catalog=Orleans;Integrated Security=True;" />
<!--<SeedNode Address="localhost" Port="11111" />-->
</Globals>
<Defaults>
<Networking Address="localhost" Port="11111" />
<ProxyingGateway Address="localhost" Port="30000" />
<Tracing DefaultTraceLevel="Info" TraceToConsole="true" TraceToFile="{0}-{1}.log">
<TraceLevelOverride LogPrefix="Application" TraceLevel="Info" />
</Tracing>
<Statistics MetricsTableWriteInterval="30s" PerfCounterWriteInterval="30s" LogWriteInterval="300s" WriteLogStatisticsToTable="true" />
</Defaults>
<Override Node="Primary">
<Networking Address="localhost" Port="11111" />
<ProxyingGateway Address="localhost" Port="30000" />
</Override>
</OrleansConfiguration>
When I use this config I get this error when running: 当我使用此配置时,我在运行时遇到此错误:
MembershipTableGrain cannot run without Seed node - please check your silo configuration file and make sure it specifies a SeedNode element.
MembershipTableGrain无法在没有Seed节点的情况下运行 - 请检查您的silo配置文件并确保它指定了SeedNode元素。 Alternatively, you may want to use AzureTable for LivenessType.
或者,您可能希望将AzureTable用于LivenessType。 Parameter name: grain = MembershipTableGrain Exception = System.ArgumentException: MembershipTableGrain cannot run without Seed node - please check your silo configuration file and make sure it specifies a SeedNode element.
参数名称:grain = MembershipTableGrain Exception = System.ArgumentException:MembershipTableGrain无法在没有Seed节点的情况下运行 - 请检查您的silo配置文件并确保它指定了SeedNode元素。 Alternatively, you may want to use AzureTable for LivenessType.
或者,您可能希望将AzureTable用于LivenessType。
and further up, the logs say that the Liveness is MembershipTableGrain (which is the default and requires a SeeNode). 更进一步说,日志说Liveness是MembershipTableGrain(这是默认值并需要SeeNode)。 What am I missing here?
我在这里错过了什么?
My silo config for SQLServer membership looks like this 我的SQLServer成员资格的silo配置如下所示
<?xml version="1.0" encoding="utf-8"?>
<OrleansConfiguration xmlns="urn:orleans">
<Globals>
<SystemStore SystemStoreType="SqlServer" DeploymentId="YYYYY" DataConnectionString="Server=THESERVER;Database=Orleans;User ID=USER;password=PASSWORD;"/>
</Globals>
<Defaults>
<Networking Address="" Port="11111"/>
<ProxyingGateway Address="" Port="30000"/>
</Defaults>
</OrleansConfiguration>
No need to specify the liveness type. 无需指定活动类型。 It figures it out by looking at the SystemStoreType.
它通过查看SystemStoreType来计算出来。
The client config does need the gateway specified 客户端配置确实需要指定的网关
<ClientConfiguration xmlns="urn:orleans">
<SystemStore SystemStoreType ="SqlServer"
DeploymentId="YYY"
DataConnectionString="Server=THESERVER;Database=Orleans;User ID=USER;password=PASSWORD;" />
<GatewayProvider ProviderType="SqlServer"/>
</ClientConfiguration>
您还可以使用可编程API进行配置,而不是使用XML。
I found the problem. 我发现了这个问题。 That is not how to change the Liveness type.
这不是如何改变活力类型。 It should be like this:
它应该是这样的:
<SystemStore SystemStoreType="SqlServer" DeploymentId="42783519-d64e-44c9-9c29-111111111133" DataConnectionString="Data Source=.\SQLEXPRESS;Initial Catalog=Orleans;Integrated Security=True;" />
<Liveness LivenessType="SqlServer" />
Also, you must make sure to ref "Microsoft.Orleans.OrleansSqlUtils" NuGet package and run this SQL Create Script 此外,您必须确保引用“Microsoft.Orleans.OrleansSqlUtils”NuGet包并运行此SQL创建脚本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.