dotnet / dotnet/orleans

Issues connecting DynamoDB from Orleans cluster

Open
#8,480 1 comment 0 reactions 0 assignees View on GitHub
Needs: triage :mag:
Dominant language
C#
Stars
10.9k
Forks
2.1k
Avg merge
14h 42m
Merged PRs (30d)
354

Description

I am trying to connect to dynamoDB from the SiloHost. However, I end up getting the following error:

`System.Net.Http.HttpRequestException: No such host is known.
---> System.Net.Sockets.SocketException (11001): No such host is known.
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
at Orleans.Clustering.DynamoDB.DynamoDBStorage.GetTableDescription(String tableName)
at Orleans.Clustering.DynamoDB.DynamoDBStorage.InitializeTable(String tableName, List`1 keys, List`1 attributes, List`1 secondaryIndexes, String ttlAttributeName)
at Orleans.Clustering.DynamoDB.DynamoDBMembershipTable.InitializeMembershipTable(Boolean tryInitTableVersion)
at Orleans.Runtime.MembershipService.MembershipTableManager.Start()
at Orleans.Runtime.MembershipService.MembershipTableManager.<>c__DisplayClass54_0.<-Participate>g__OnRuntimeGrainServicesStart|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Orleans.Runtime.SiloLifecycleSubject.MonitoredObserver.OnStart(CancellationToken ct)
at Orleans.LifecycleSubject.OnStart(CancellationToken ct)
at Orleans.Runtime.Scheduler.AsyncClosureWorkItem.Execute()
at Orleans.Runtime.Silo.StartAsync(CancellationToken cancellationToken)
at Orleans.Hosting.SiloHost.StartAsync(CancellationToken cancellationToken)
at OrleansSnapperSiloHost.Program.RunMainAsync() in C:\Users\Administrator\Desktop\Snapper-Orleans\SnapperSiloHost\Program.cs:line 115`

This is a windows host on AWS. I have ensured that the firewall is off, all network connection is allowed.

` using (var file = new StreamReader(Constants.credentialFile))
{
ServiceRegion = file.ReadLine();
Console.WriteLine(ServiceRegion);
AccessKey = file.ReadLine();
Console.WriteLine(AccessKey);
SecretKey = file.ReadLine();
Console.WriteLine(SecretKey);
}

Action dynamoDBOptions = options =>
{
options.AccessKey = AccessKey;
options.SecretKey = SecretKey;
options.TableName = Constants.SiloMembershipTable;
options.Service = ServiceRegion;
options.WriteCapacityUnits = 10;
options.ReadCapacityUnits = 10;
};
Console.WriteLine("Using DynamoDB");
builder.UseDynamoDBClustering(dynamoDBOptions);`

This is how I am connecting.
Please help! Thanks!

Contributor guide

Open the contributing guide

Research direction

Read Program.cs at line 115 and the UseDynamoDBClustering configuration, then trace the DynamoDBStorage.InitializeTable and GetTableDescription calls shown in the stack trace. Verify what ServiceRegion contains and whether the SiloHost can resolve the configured DynamoDB endpoint; done means the silo initializes its membership table without the reported HttpRequestException.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
cloud, databases, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.