amazon-archives / aws-sdk-xamarin

AWS Mobile SDK for Xamarin (Beta)
Apache License 2.0
45 stars 18 forks source link

ScanAsync throws SocketException: Network is unreachable when using DynamoDB Local #4

Closed Steven-Mark-Ford closed 9 years ago

Steven-Mark-Ford commented 10 years ago

@tawalke When calling ScanAsync on my local context object an exception is thrown

context setup:

AWSCredentials credentials = new BasicAWSCredentials("Fake", "Fake");
client = new AmazonDynamoDBClient(credentials, new AmazonDynamoDBConfig(){ ServiceURL = "http://localhost:8000"}); // use local dynamo db
context = new DynamoDBContext(client);

Local DynamoDB is running (with default port)

Exception: Amazon.Runtime.AmazonServiceException: A WebException with status ConnectFailure was thrown. ---> System.Net.WebException: Error: ConnectFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in :0 at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00000] in :0 --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in :0 at System.Threading.Tasks.TaskFactory1[System.IO.Stream].InnerInvoke (System.Threading.Tasks.TaskCompletionSource1 tcs, System.Func2 endMethod, IAsyncResult l) [0x00000] in <filename unknown>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00000] in :0 at System.Net.Http.HttpClientHandler+casync0.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in :0 at System.Net.Http.HttpClient+casync0.MoveNext () [0x00000] in :0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.Net.Http.HttpResponseMessage].GetResult () [0x00000] in <filename unknown>:0 at Amazon.Runtime.HttpWebRequestMessage+<GetResponseAsync>d__0.MoveNext () [0x0001c] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\HttpHandler\HttpRequestMessageFactory.cs:244 --- End of inner exception stack trace --- at Amazon.Runtime.Internal.WebExceptionHandler.HandleException (IExecutionContext executionContext, System.Net.WebException exception) [0x0005b] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\ErrorHandler\WebExceptionHandler.cs:44 at Amazon.Runtime.Internal.ExceptionHandler1[System.Net.WebException].Handle (IExecutionContext executionContext, System.Exception exception) [0x00000] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\ErrorHandler\ExceptionHandler.cs:38 at Amazon.Runtime.Internal.ErrorHandler.ProcessException (IExecutionContext executionContext, System.Exception exception) [0x0005e] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:202 at Amazon.Runtime.Internal.ErrorHandler.InvokeSync (IExecutionContext executionContext) [0x00015] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\ErrorHandler\ErrorHandler.cs:76 at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00008] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\PipelineHandler.cs:56 at Amazon.Runtime.Internal.GenericHandler.InvokeSync (IExecutionContext executionContext) [0x00007] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\Handlers\GenericHandler.cs:35 at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00008] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\PipelineHandler.cs:56 at Amazon.Runtime.Internal.GenericHandler.InvokeSync (IExecutionContext executionContext) [0x00007] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\Handlers\GenericHandler.cs:35 at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00008] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\PipelineHandler.cs:56 at Amazon.Runtime.Internal.GenericHandler.InvokeSync (IExecutionContext executionContext) [0x00007] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\Handlers\GenericHandler.cs:35 at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00008] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\PipelineHandler.cs:56 at Amazon.Runtime.Internal.RetryHandler.InvokeSync (IExecutionContext executionContext) [0x00010] in f:\Tara\Code Files\AWS.XamarinSDK\AWSSDK_Android\Amazon.Runtime\Pipeline\RetryHandler\RetryHandler.cs:60 } Amazon.Runtime.AmazonServiceException

tawalke commented 10 years ago

Hi I thought we resolved this? Did we? Please advise so I can test.

tawalke commented 9 years ago

Hi @Steven-Mark-Ford Was this resolved? I do not want to close the issue if this is still outstanding. Please note an updated version of the SDK was released today. Please review and provide feedback if this is still outstanding.