Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Orleans Specify SqlServer for Liveness

I am trying to setup a test environment for Orleans that uses SQL Server for liveness. 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. Alternatively, you may want to use AzureTable for 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. Alternatively, you may want to use AzureTable for LivenessType.

and further up, the logs say that the Liveness is MembershipTableGrain (which is the default and requires a SeeNode). What am I missing here?

like image 591
Zeus82 Avatar asked Dec 28 '25 18:12

Zeus82


1 Answers

My silo config for SQLServer membership looks like this

<?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.

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>
like image 97
BozoJoe Avatar answered Dec 31 '25 08:12

BozoJoe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!