English 中文(简体)
OpenIdDict Error server_error", error_description="The remote authorization server is currently unavailable or returned an invalid configuration
原标题:

we are using OpenIdDict with Auth Server and resource server as two separate project and two separate url. It works in local and as alpha1 but fail in stage where we have load balancer. it works with single server. we use Dataprotection keys also Error in logs :

[Error] [OpenIddict.Validation.OpenIddictValidationDispatcher] A network error occured while communicating with the remote HTTP server. System.Net.Http.HttpRequestException: No such host is known. (xxx-www.yyyy.zzz.com:443) ---> System.Net.Sockets.SocketException (11001): No such host is known. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy1.ExecuteAsync(Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at OpenIddict.Validation.SystemNetHttp.OpenIddictValidationSystemNetHttpHandlers.SendHttpRequest`1.HandleAsync(TContext context)

23:26:38.499 +01:00 [Error] [OpenIddict.Validation.OpenIddictValidationDispatcher] An error occurred while retrieving the configuration of the remote authorization server. System.InvalidOperationException: IDX20803: Unable to obtain configuration from: [PII of type System.String is hidden. For more details, see https://aka.ms/IdentityModel/PII.] . ---> OpenIddict.Abstractions.OpenIddictExceptions+ProtocolException: An error occurred while sending the configuration request. Error: server_error Error description: An error occurred while communicating with the remote HTTP server. Error URI: https://documentation.openiddict.com/errors/ID2136 at OpenIddict.Validation.OpenIddictValidationService.<>c__DisplayClass3_0.<g__ApplyConfigurationRequestAsync|1>d.MoveNext() --- End of stack trace from previous location --- at OpenIddict.Validation.OpenIddictValidationService.GetConfigurationAsync(Uri uri, CancellationToken cancellationToken) at OpenIddict.Validation.OpenIddictValidationService.GetConfigurationAsync(Uri uri, CancellationToken cancellationToken) at OpenIddict.Validation.OpenIddictValidationRetriever.Microsoft.IdentityModel.Protocols.IConfigurationRetriever<OpenIddict.Abstractions.OpenIddictConfiguration>.GetConfigurationAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) at OpenIddict.Validation.OpenIddictValidationHandlers.ResolveServerConfiguration.HandleAsync(ProcessAuthenticationContext context)

23:26:38.509 +01:00 [Information] [OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler] "OpenIddict.Validation.AspNetCore" was not authenticated. Failure message: "An error occurred while authenticating the current request."

23:26:38.596 +01:00 [Information] [OpenIddict.Validation.OpenIddictValidationDispatcher] The response was successfully returned as a challenge response: "{ "error": "server_error", "error_description": "The remote authorization server is currently unavailable or returned an invalid configuration.", "error_uri": "https://documentation.openiddict.com/errors/ID2170" }".

问题回答

暂无回答




相关问题
未证实的批量-类型错误

我正试图利用春天安全,使用开放式电话联线,使用OAuth2授权服务器。

凌驾于多租期的钥匙花 the?

so I have micro service application where one of those called auth_manager used to authenticate and register new user , I use the auth_manager to get token for user from keycloak , and other services ...

ASP.NET Core 2 .1 - How to show all data in table

I don t know how to put CustomerData into CustomerLists property. I m already using CustomerLists = CustomerData; but I got error: CustomerLists is a type but is used like a variable Can anyone ...

Choosing an OIDC flow for WebAuthn when using Keycloak

I am new to OIDC and WebAuthn. I want to provide a progressive passwordless experience for my users. I understand that passkeys are supported by Windows/Mac/iOS/Android. I want to configure a Keycloak ...

热门标签