SiloHost on Kubernetes

9/20/2018

I am trying to start a Microsoft Orleans Silo Host on Azure Kubernetes cluster. My configuration in code is the following

var builder = new SiloHostBuilder()
            .Configure<ClusterOptions>(options =>
            {
                options.ClusterId = appSettings.OrleansSettings.ClusterId;
                options.ServiceId = appSettings.OrleansSettings.ServiceId;
            })
            .Configure<ClusterMembershipOptions>(opt =>
            {
                opt.ValidateInitialConnectivity = false;
            })
            .UseKubeMembership(opt =>
            {
                opt.CanCreateResources = true;
                opt.DropResourcesOnInit = true;
            })
            .ConfigureEndpoints
            (
                siloPort: appSettings.OrleansSettings.SiloPort,
                gatewayPort: appSettings.OrleansSettings.GatewayPort,
                addressFamily: System.Net.Sockets.AddressFamily.InterNetwork,
                listenOnAnyHostAddress: true
            )
            .Configure<ProcessExitHandlingOptions>(o =>
            {
                o.FastKillOnProcessExit = true;
            });

And I have this on my appsettings.json

"AppSettings": {
    "OrleansSettings": {
      "ClusterId": "OrleansCluster",
      "ServiceId": "OrleansService",
      "SiloPort": 11111,
  "GatewayPort": 30000
}

The builder builds correctly, but when running the StartAsync method:

var host = builder.Build();
await host.StartAsync();

I get this error:

Couldn't start silohost. Error: Orleans.Runtime.OrleansLifecycleCanceledException: Lifecycle start canceled due to errors at stage 8000 ---> System.TimeoutException: Starting MembershipOracle failed due to timeout 00:05:00

And I don't know what the problem seems to be.

-- Mihai Podaru
.net
azure-cloud-services
azure-kubernetes
kubernetes
orleans

0 Answers