HttpRequestException: Response status code does not indicate success: 503 (Service Unavailable).
System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
System.Net.Http.HttpClient.GetStringAsyncCore(Task
Microsoft.eShopOnContainers.WebMVC.Services.CatalogService.GetCatalogItems(int page, int take, Nullable
Microsoft.eShopOnContainers.WebMVC.Controllers.CatalogController.Index(Nullable
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
System.Threading.Tasks.ValueTask
System.Runtime.CompilerServices.ValueTaskAwaiter
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.
Microsoft.AspNetCore.Routing.EndpointMiddleware.
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Set docker memory to 6gigs. Make sure all containers deleted. then run.. That helped for me
Getting exception from below code block
private static void InvokeSeeder
where TContext : DbContext
{
context.Database.Migrate();
seeder(context, services);
}
}
Microsoft.Data.SqlClient.SqlException
HResult=0x80131904
Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)
Source=Core Microsoft SqlClient Data Provider
StackTrace:
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, SqlAuthenticationProviderManager sqlAuthProviderManager)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnection(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerDatabaseCreator.<>c__DisplayClass18_0.<Exists>b__0(DateTime giveUp)
at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.<>c__DisplayClass12_02.
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementationTState,TResult
at Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteTState,TResult
at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.ExecuteTState,TResult
at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.ExecuteTState,TResult in D:Visual studio 2019 ProjectseShopOnContainers-devsrcBuildingBlocksWebHostCustomizationWebHost.CustomizationWebHostExtensions.cs:line 75
at Microsoft.AspNetCore.Hosting.IWebHostExtensions.<>c__DisplayClass1_11.<MigrateDbContext>b__2() in D:\Visual studio 2019 Projects\eShopOnContainers-dev\src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHostExtensions.cs:line 54
at Polly.Policy.<>c__DisplayClass108_0.<Execute>b__0(Context ctx, CancellationToken ct)
at Polly.Policy.<>c__DisplayClass138_0.<Implementation>b__0(Context ctx, CancellationToken token)
at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider)
how did this got resolved?
Thanks,
Yes It got resolved.
Devendra Sahu
From: neoAnkit [mailto:[email protected]]
Sent: Friday, March 20, 2020 2:37 PM
To: dotnet-architecture/eShopOnContainers eShopOnContainers@noreply.github.com
Cc: Devendra Sahu Devendra.Sahu@xeeva.com; State change state_change@noreply.github.com
Subject: Re: [dotnet-architecture/eShopOnContainers] when running through F5 from visual studio 2019 getting HttpRequestException: Response status code does not indicate success: 503 (Service Unavailable). (#1267)
WARNING: This E-Mail is from an outside source. Practice Caution!
how did this got resolved?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/dotnet-architecture/eShopOnContainers/issues/1267#issuecomment-601597672, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALINB34TSIWALWINYZTMBQTRIMW3NANCNFSM4LHC367A.
How?
By your previous suggestion , and also I waited to completed heath check done.
Thanks
From: neoAnkit [mailto:[email protected]]
Sent: Friday, March 20, 2020 2:58 PM
To: dotnet-architecture/eShopOnContainers eShopOnContainers@noreply.github.com
Cc: Devendra Sahu Devendra.Sahu@xeeva.com; State change state_change@noreply.github.com
Subject: Re: [dotnet-architecture/eShopOnContainers] when running through F5 from visual studio 2019 getting HttpRequestException: Response status code does not indicate success: 503 (Service Unavailable). (#1267)
WARNING: This E-Mail is from an outside source. Practice Caution!
How?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/dotnet-architecture/eShopOnContainers/issues/1267#issuecomment-601605782, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALINB33EGX66F5KTW5D6LULRIMZJTANCNFSM4LHC367A.
I found that refreshing the page after 15-20 seconds resolves the issue.