Open Closed

https://support.abp.io/QA/Questions/2558/Identity-Server-Error---Microservices #2809


User avatar
0
ronaksbhavsar created

Any update on this issue as I am facing it? https://support.abp.io/QA/Questions/2558/Identity-Server-Error---Microservices Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable`1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGGMACV3F50:00000003", "TimeStamp": "2022-03-29T06:18:46.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.33:80", "RemoteIpAddress": "14.98.119.214", "$type": "UnhandledExceptionEvent"}
  • Steps to reproduce the issue: Identity Auth server

25 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    When does this error occur exactly? On which operation you are doing, you get this error? How can we reproduce it?

  • User Avatar
    0
    ronaksbhavsar created

    I am getting this exception on each and every one or two hours from auth server and after that unable to access anything in system Unable to login through password grant type and Web Admin portal too.

    2022-03-30 19:02:17 [13:32:17 INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2022-03-30 19:02:17 [13:32:17 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2022-03-30 19:02:17 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-30 19:02:17 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-30 19:02:17 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-30 19:02:17 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-30 19:02:17 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 ERR] An unhandled exception has occurred while executing the request. 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-30 19:02:17 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-30 19:02:17 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-30 19:02:17 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-30 19:02:17 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 FTL] Unhandled exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 INF] {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGI9DB2HCV5:00000002", "TimeStamp": "2022-03-30T13:32:17.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.49:80", "RemoteIpAddress": "202.131.101.34", "$type": "UnhandledExceptionEvent"} 2022-03-30 19:02:17 [13:32:17 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration 2022-03-30 19:02:17 [13:32:17 INF] Request starting HTTP/1.1 GET http://idmstg-authserver.conlog.com/.well-known/openid-configuration - -

    Full exception in detail

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Check the identityserver logs. https://idmstg-authserver.conlog.com/.well-known/openid-configuration should be reachable.

  • User Avatar
    0
    ronaksbhavsar created

    I am getting this exception on each and every one or two hours from auth server and after that unable to access anything in system Unable to login through password grant type and Web Admin portal too.

    2022-03-30 19:02:17 [13:32:17 INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2022-03-30 19:02:17 [13:32:17 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2022-03-30 19:02:17 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 --- End of stack trace from previous location --- 2022-03-30 19:02:17 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-30 19:02:17 at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-30 19:02:17 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-30 19:02:17 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-30 19:02:17 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-30 19:02:17 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-30 19:02:17 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 ERR] An unhandled exception has occurred while executing the request. 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-30 19:02:17 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-30 19:02:17 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-30 19:02:17 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-30 19:02:17 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 FTL] Unhandled exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 INF] {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGI9DB2HCV5:00000002", "TimeStamp": "2022-03-30T13:32:17.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.49:80", "RemoteIpAddress": "202.131.101.34", "$type": "UnhandledExceptionEvent"} 2022-03-30 19:02:17 [13:32:17 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration 2022-03-30 19:02:17 [13:32:17 INF] Request starting HTTP/1.1 GET http://idmstg-authserver.conlog.com/.well-known/openid-configuration - -

    Full exception in detail

    These are the logs which i already shared

  • User Avatar
    0
    ronaksbhavsar created

    Sharing again with you

    2022-03-31 12:55:38 [07:25:38 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2022-03-31 12:55:38 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 --- End of stack trace from previous location --- 2022-03-31 12:55:38 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 12:55:38 at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 12:55:38 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-31 12:55:38 at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) 2022-03-31 12:55:38 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 12:55:38 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 12:55:38 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-31 12:55:38 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-31 12:55:38 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-31 12:55:38 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-31 12:55:38 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-31 12:55:38 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-31 12:55:38 [07:25:38 ERR] An unhandled exception has occurred while executing the request. 2022-03-31 12:55:38 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 12:55:38 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-31 12:55:38 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-31 12:55:38 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-31 12:55:38 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-31 12:55:38 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-31 12:55:38 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-31 12:55:38 [07:25:38 FTL] Unhandled exception: Exception of type 'System.Exception' was thrown. 2022-03-31 12:55:38 [07:25:38 INF] {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable`1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGI9DB2HD08:00000002", "TimeStamp": "2022-03-31T07:25:38.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.49:80", "RemoteIpAddress": "202.131.101.34", "$type": "UnhandledExceptionEvent"} 2022-03-31 12:55:38 [07:25:38 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    [13:32:17 ERR] An unhandled exception has occurred while executing the request. 2022-03-30 19:02:17 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-30 19:02:17 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-30 19:02:17 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-30 19:02:17 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-30 19:02:17 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-30 19:02:17 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-30 19:02:17 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 FTL] Unhandled exception: Exception of type 'System.Exception' was thrown. 2022-03-30 19:02:17 [13:32:17 INF] {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGI9DB2HCV5:00000002", "TimeStamp": "2022-03-30T13:32:17.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.49:80", "RemoteIpAddress": "202.131.101.34", "$type": "UnhandledExceptionEvent"}

    This seems an error from IdentityServerMiddleware but I have no idea what causes it.

    Can you share your AuthServerModule?

  • User Avatar
    0
    ronaksbhavsar created

    Here is the AuthserverModule.

    [DependsOn(
        typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
        typeof(AbpCachingStackExchangeRedisModule),
        typeof(AbpEventBusRabbitMqModule),
        typeof(AbpBackgroundJobsRabbitMqModule),
        typeof(AbpAspNetCoreMvcUiLeptonThemeModule),
        typeof(AbpAccountPublicWebIdentityServerModule),
        typeof(AbpAccountPublicApplicationModule),
        typeof(AdministrationServiceEntityFrameworkCoreModule),
        typeof(IdentityServiceEntityFrameworkCoreModule),
        typeof(SaasServiceEntityFrameworkCoreModule),
        typeof(SharedHostingAspNetCoreModule),
        typeof(SharedLocalizationModule)
        )]
    public class AuthServerModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var hostingEnvironment = context.Services.GetHostingEnvironment();
            var configuration = context.Services.GetConfiguration();
            
            context.Services.AddSameSiteCookiePolicy(); // cookie policy to deal with temporary browser incompatibilities
    
            context.Services.AddAuthentication()               
                .AddJwtBearer(options =>
                {
                    options.Authority = configuration["AuthServer:Authority"];
                    options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
                    options.Audience = "AuthServer";
                    
                });
    
            context.Services.Configure&lt;ForwardedHeadersOptions&gt;(options =>
            {
                options.ForwardedHeaders =
                    ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost;
                options.KnownNetworks.Clear();
                options.KnownProxies.Clear();
            });
    
            Configure&lt;AbpMultiTenancyOptions&gt;(options =>
            {
                options.IsEnabled = false;
            });
    
            Configure&lt;AbpAuditingOptions&gt;(options =>
            {
                options.ApplicationName = "AuthServer";
            });
    
            Configure&lt;AppUrlOptions&gt;(options =>
            {
                options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
                options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
                options.Applications["Angular"].RootUrl= configuration["App:ClientUrl"];
                options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
                options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation";
            });
    
            Configure&lt;AbpDistributedCacheOptions&gt;(options =>
            {
                options.KeyPrefix = "Home:";
            });
    
            var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
            context.Services
                .AddDataProtection()
                .PersistKeysToStackExchangeRedis(redis, "Home-Protection-Keys");
            context.Services.AddSameSiteCookiePolicy();
            
    
            context.Services.AddCors(options =>
            {
                options.AddDefaultPolicy(builder =>
                {
                    builder
                        .WithOrigins(
                            configuration["App:CorsOrigins"]
                                .Split(",", StringSplitOptions.RemoveEmptyEntries)
                                .Select(o => o.Trim().RemovePostFix("/"))
                                .ToArray()
                        )
                        .WithAbpExposedHeaders()
                        .SetIsOriginAllowedToAllowWildcardSubdomains()
                        .AllowAnyHeader()
                        .AllowAnyMethod()
                        .AllowCredentials();
                });
            });
    

    #if DEBUG context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>()); #endif

            if (hostingEnvironment.IsDevelopment())
            {
                Configure&lt;AbpVirtualFileSystemOptions&gt;(options =>
                {
                    options.FileSets.ReplaceEmbeddedByPhysical&lt;HomeSharedLocalizationModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath,
                        $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}shared{Path.DirectorySeparatorChar}Home.Shared.Localization"));
                });
            }
        }
    
        public override void PreConfigureServices(ServiceConfigurationContext context)
        {
            PreConfigure&lt;IdentityBuilder&gt;(identityBuilder =>
            {
                identityBuilder.AddSignInManager&lt;CustomSignInManager&gt;();                
            });
            PreConfigure&lt;IIdentityServerBuilder&gt;(identityServerBuilder =>
            {
                identityServerBuilder.AddExtensionGrantValidator&lt;ExternalGrant&gt;();
            });
        }
    
        public override void OnApplicationInitialization(ApplicationInitializationContext context)
        {
            var app = context.GetApplicationBuilder();
            var env = context.GetEnvironment();            
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            app.UseForwardedHeaders();
            app.UseAbpRequestLocalization();
    
            if (!env.IsDevelopment())
            {
                app.UseErrorPage();
            }
          
            app.UseCorrelationId();
            app.UseStaticFiles();
            app.UseRouting();
            app.UseCors();
            app.UseHttpMetrics();
            app.UseCookiePolicy();
            app.UseAuthentication();
            app.UseJwtTokenMiddleware();
            app.UseMultiTenancy();
            app.UseAbpSerilogEnrichers();
            app.UseUnitOfWork();            
            app.UseIdentityServer();            
            app.UseAuthorization();
            app.UseAuditing();            
            app.UseConfiguredEndpoints(endpoints =>
            {
                endpoints.MapMetrics();
            });
        }
    }
    
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    I don't know if it is related to it but: I think you are using it behind reverse proxy since you seem to have configured ForwardedHeadersOptions but not used the midware at OnApplicationInitialization:

    ...
    
    app.UseForwardedHeaders();
    app.UseCorrelationId();
    app.UseStaticFiles();
    app.UseRouting();
    
  • User Avatar
    0
    ronaksbhavsar created

    means if I added

    context.Services.Configure<ForwardedHeadersOptions>(options => { options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost; options.KnownNetworks.Clear(); options.KnownProxies.Clear(); });

    then don't require to add app.UseForwardedHeaders();

    line?

  • User Avatar
    0
    ronaksbhavsar created

    We are using Kubernetes ingress

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer
  • User Avatar
    0
    ronaksbhavsar created

    Same exception again even after following Deployment Guide. Please help me to resolve it.

    2022-03-31 17:47:39 [12:17:39 INF] CORS policy execution successful. 2022-03-31 17:47:39 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task) 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at iDMHome.AuthServer.iDMHomeAuthServerModule.<>c.<<OnApplicationInitialization>b__2_1>d.MoveNext() in /home/vsts/work/1/s/apps/auth-server/src/iDMHome.AuthServer/iDMHomeAuthServerModule.cs:line 179 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 --- End of stack trace from previous location --- 2022-03-31 17:47:39 at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() 2022-03-31 17:47:39 at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) 2022-03-31 17:47:39 at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>g__InvokeCoreAwaited|15_0(HttpContext context, Task1 policyTask) 2022-03-31 17:47:39 at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) 2022-03-31 17:47:39 at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) 2022-03-31 17:47:39 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 17:47:39 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 17:47:39 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-31 17:47:39 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-31 17:47:39 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-31 17:47:39 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-31 17:47:39 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-31 17:47:39 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-31 17:47:39 [12:17:39 ERR] An unhandled exception has occurred while executing the request. 2022-03-31 17:47:39 at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) 2022-03-31 17:47:39 at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context) 2022-03-31 17:47:39 at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri) 2022-03-31 17:47:39 at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) 2022-03-31 17:47:39 at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() 2022-03-31 17:47:39 at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 ) 2022-03-31 17:47:39 System.Exception: Exception of type 'System.Exception' was thrown. 2022-03-31 17:47:39 [12:17:39 FTL] Unhandled exception: Exception of type 'System.Exception' was thrown. 2022-03-31 17:47:39 [12:17:39 INF] {"Details": "System.Exception: Exception of type 'System.Exception' was thrown.\n at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32 )\n at System.Linq.Enumerable.SelectArrayIterator2.MoveNext()\n at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)", "Category": "Error", "Name": "Unhandled Exception", "EventType": "Error", "Id": 3000, "Message": "Exception of type 'System.Exception' was thrown.", "ActivityId": "0HMGJ1M8AP6KC:00000013", "TimeStamp": "2022-03-31T12:17:39.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:10.244.2.68:80", "RemoteIpAddress": "::ffff:10.244.3.231", "$type": "UnhandledExceptionEvent"}

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Can you also ask this question to identityserver4 issues and StackOverflow to get faster response?

    I didn't experience any error related to IdentityServerMiddleware similar to this issue. Also, this is not something we can reproduce.

  • User Avatar
    0
    ronaksbhavsar created

    Added new issue in Github Identtiyserver4

    https://github.com/IdentityServer/IdentityServer4/issues/5443

  • User Avatar
    0
    ronaksbhavsar created

    Hello Support team,

    Kindly check this ticket as i have created related to this one and provide me a help.

    https://github.com/DuendeSoftware/Support/issues/19

  • User Avatar
    0
    enes.koroglu created

    Hi guys,

    I see two topics about this problem. This question and chris.tune's question. I see @chris.tune, @ronaksbhavsar and we all use ABP 4.4.4 version and Angular UI. @chris.tune and @ronaksbhavsar are using Identity Server Separated (Angular) but we are not. Although we are facing same problem.

    We were not having this problem, until upgrading to 4.4.4.

    Also we are having problem this problem in production environment and help is needed urgently. Also we got HTTP 500 error from .well-known/openid-configuration when having this problem. Restarting service is solving problem for a short while. We increased server memory (regarding gterdem's comment to chris' message) but anytinhg did not change.

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    @enes.koroglu Can you give more information about:

    • From what version to 4.4.4 did you update your application?
    • Do you get the same error above when you check your backend logs for 500 error?
    • What is your deployment environment? IIS, docker, kubernetes etc?

    @ronaksbhavsar

    • You are using directly ABP 4.4.4 angular UI with separated IdentityServer, not updated right? Can you confirm?
    • You are running IdentityServer on Kubernetes, can you confirm?

    Did you tried to update (or downgrade) your application to see if it occurs again?

  • User Avatar
    0
    enes.koroglu created

    @gterdem We have upgrade from 4.3.3 to 4.4.4 and using Application template not Microservice template. We are using Centos server on prem and do not using docker, kubernetes etc. Running services via supervisorctl You can find our error log:

    2022-04-05 15:52:19.539 +03:00 [FTL] Unhandled exception: Exception of type 'System.Exception' was thrown.
    System.Exception: Exception of type 'System.Exception' was thrown.
       at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32  )
       at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)
       at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)
       at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
       at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
    2022-04-05 15:52:19.539 +03:00 [ERR] An unhandled exception has occurred while executing the request.
    System.Exception: Exception of type 'System.Exception' was thrown.
       at x973ltTuyr0iNFtkVC2.uoxoRDTMlI1EVNyvYXa.O5QlTBeshI(Int32  )
       at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
       at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
       at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)
       at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)
       at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
       at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService)
       at IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
       at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
       at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
    --- End of stack trace from previous location ---
       at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
    --- End of stack trace from previous location ---
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
    
  • User Avatar
    0
    chris.tune@gmail.com created

    Hi All

    Just a bit of an update.

    We were originally using version 3 then 4, where the error occurred.

    We have upgraded to 5.1.3 **and we haven't had the problem since. **

    But we did make other changes too... mainly due to differences in the microservices templates from version 3 to 5. We had also missed something from the upgrade guide from 3 to 4.

    I would recommend upgrading if possible. If that does not work then a template comparison of the microservices template/template with your current one may help.

    I think even the order of our middleware may have been a contributor.

    It is time-consuming but we did resolve a lot of small issues.

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Thanks for the information @chris.tune

    Can you also share your middleware order if it can help others also? Can you also give information about your production environment like is it Kubernetes cluster, IIS etc?

  • User Avatar
    0
    ronaksbhavsar created

    @enes.koroglu
    Can you give more information about:

    • From what version to 4.4.4 did you update your application?
    • Do you get the same error above when you check your backend logs for 500 error?
    • What is your deployment environment? IIS, docker, kubernetes etc?

    @ronaksbhavsar

    • You are using directly ABP 4.4.4 angular UI with separated IdentityServer, not updated right? Can you confirm?
    • You are running IdentityServer on Kubernetes, can you confirm?

    Did you tried to update (or downgrade) your application to see if it occurs again?

    I am using ABP 4.4.4 and running Identity server in Kubernetes I never upgraded or downgraded version

    Thanks for update

  • User Avatar
    0
    ronaksbhavsar created

    @gterdem Please guide us to resolve or May i go through upgrade the version?

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    @ronaksbhavsar,

    I am sorry, I have no experience or expertise in the problem you are having in your production environment.

    Seems @chris.tune also had the same problem and he resolved it after upgrading to v5.1.3.

    I would suggest trying to same by taking migration guides into consideration

  • User Avatar
    0
    ronaksbhavsar created

    Thank you all of you Seems working fine after upgrading to abp version to 5.2.0

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    It's good to hear that. I close the question since your problem is resolved.

    Best regards.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11