For a few days I have been playing around with the Microsoft.CRA framework. While the codebase is not up to date (docker build on master doesnt work among other things) I managed to get a sample project running in some time.
This was in a local kubernetes cluster, connected to Azure Storage. Launching the application would go via the recovery route, ie first 'deploy' to the Azure storage and then let each instance in the kubernetes cluster pull in binaries etc. (as I have yet to figure out how to expose the containers so the cra-instances could be reached from outside the kubernetes cluster)
Now I wanted to experiment with some custom code and this has left me utterly puzzled, I keep getting Azure storage errors when the cra-instances are trying to pull their endpoint/vertex etc data from the Azure tables. Please see below. Its very hard to spot the error as it takes 5 minutes before it gets thrown. Interestingly the error only gets thrown in the kubernetes cluster, as when I try to run a cra-instance from the host OS (debug from vs) it just hangs forever after showing the startup message.
Perhaps the issue lies in the docker containers I am running the application from (containers based on netcore runtime 2.1), though as it did work with the example and also does not work from the host OS this may be unlikely.
PS. the interest in this particular framework is because I feel it is a perfect fit to use in a part of my MSc thesis.
Unhandled Exception: System.AggregateException: One or more errors occurred. (Resource temporarily unavailable) ---> Microsoft.WindowsAzure.Storage.StorageException: Resource temporarily unavailable ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException: Resource temporarily unavailable
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.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
at System.Threading.Tasks.ValueTask`1.get_Result()
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 Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
at CRA.ClientLibrary.TableExtensions.ExecuteQueryAsync[T](CloudTable table, TableQuery`1 query, CancellationToken ct, Action`1 onProgress) in C:\projects\CRA-master\src\CRA.ClientLibrary\Utilities\AssemblyUtils.cs:line 32
at CRA.DataProvider.Azure.AzureVertexInfoProvider.GetAll() in C:\projects\CRA-master\src\CRA.ClientLibrary\AzureProvider\AzureVertexInfoProvider.cs:line 22
at CRA.DataProvider.Azure.AzureVertexInfoProvider.GetAllRowsForInstance(String instanceName) in C:\projects\CRA-master\src\CRA.ClientLibrary\AzureProvider\AzureVertexInfoProvider.cs:line 39
at CRA.ClientLibrary.CRAWorker.RestoreVerticesAndConnections() in C:\projects\CRA-master\src\CRA.ClientLibrary\Main\CRAWorker.cs:line 899
at CRA.ClientLibrary.CRAWorker.StartServer() in C:\projects\CRA-master\src\CRA.ClientLibrary\Main\CRAWorker.cs:line 959
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at CRA.ClientLibrary.CRAWorker.<Start>b__21_0() in C:\projects\CRA-master\src\CRA.ClientLibrary\Main\CRAWorker.cs:line 138
at System.Threading.Thread.ThreadMain_ThreadStart()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()