Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orleans Message Rejection Exception on Azure: Unable to Connect to Silo Endpoint #9129

Open
SebastianDevelops opened this issue Aug 28, 2024 · 0 comments

Comments

@SebastianDevelops
Copy link

I’m encountering issues with an Orleans application running on Azure. For some odd reason when the silo instances table contains data, I get the following:

Orleans.Runtime.OrleansMessageRejectionException: Exception while sending message: Orleans.Runtime.Messaging.ConnectionFailedException: Unable to connect to S10.0.0.254:20038:83628028, will retry after 981.0283ms
   at Orleans.Runtime.Messaging.ConnectionManager.GetConnectionAsync(SiloAddress endpoint) in /_/src/Orleans.Core/Networking/ConnectionManager.cs:line 99
   at Orleans.Runtime.Messaging.MessageCenter.<SendMessage>g__SendAsync|29_0(MessageCenter messageCenter, ValueTask`1 connectionTask, Message msg) in /_/src/Orleans.Runtime/Messaging/MessageCenter.cs:line 226
   at Orleans.Serialization.Invocation.ResponseCompletionSource`1.GetResult(Int16 token) in /_/src/Orleans.Serialization/Invocation/ResponseCompletionSource.cs:line 230
   at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)

Private ports are configured to provide 2 ports and Orleans is configured like this:

var endpointAddress =
    IPAddress.Parse(context.Configuration["WEBSITE_PRIVATE_IP"]!);
var strPorts =
    context.Configuration["WEBSITE_PRIVATE_PORTS"]!.Split(',');
if (strPorts.Length < 2)
    throw new Exception("Insufficient private ports configured.");
var (siloPort, gatewayPort) =
    (int.Parse(strPorts[0]), int.Parse(strPorts[1]));

siloBuilder
    .ConfigureEndpoints(endpointAddress, siloPort, gatewayPort)
    .UseAzureStorageClustering(opt =>
    {
        opt.TableName = orleansSettings.TableStorageConfig.TableName;
        opt.TableServiceClient = new TableServiceClient(settings.TableStorageConfig.ConnectionString);
    })
    .Configure<ClusterOptions>(options =>
    {
        options.ClusterId = settings.ClusterConfiguration.ClusterId;
        options.ServiceId = settings.ClusterConfiguration.ServiceId;
    }).AddAzureBlobGrainStorage(Constants.Orleans.GrainStorageProviderName, (AzureBlobStorageOptions options) =>
  {
      options.BlobServiceClient = new BlobServiceClient(settings.BlobstorageConfig.ConnectionString);
      options.ContainerName = Invariant($"{settings.EnvironmentPrefix}{Constants.Orleans.GrainStorageProviderName}");
  })

Any insights on how I can work past this issue? Besides clearing the instances table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant