nhsconnect / gpconnect-appointment-checker

GP Connect Appointment Checker
4 stars 1 forks source link

Intermittent LDAP Interthreadexception / ldapexception #52

Closed jonnyry closed 3 years ago

jonnyry commented 3 years ago
{ "type": "Novell.Directory.Ldap.InterThreadException", "message": "Connect Error", "stacktrace": "   at Novell.Directory.Ldap.LdapResponse.ChkResultCode()\n   at Novell.Directory.Ldap.LdapSearchResults.Next()\n   at gpconnect_appointment_checker.SDS.SDSQueryExecutionService.ExecuteLdapQuery[T](String searchBase, String filter, String[] attributes) in \/src\/gpconnect-appointment-checker.SDS\/SDSQueryExecutionService.cs:line 75\n   at gpconnect_appointment_checker.SDS.SDSQueryExecutionService.ExecuteLdapQuery[T](String searchBase, String filter) in \/src\/gpconnect-appointment-checker.SDS\/SDSQueryExecutionService.cs:line 39\n   at gpconnect_appointment_checker.SDS.LdapService.GetGpProviderEndpointAndPartyKeyByOdsCode(String odsCode) in \/src\/gpconnect-appointment-checker.SDS\/Ldap\/LdapService.cs:line 58\n   at gpconnect_appointment_checker.Pages.SearchModel.GetSearchResults() in \/src\/gpconnect-appointment-checker\/Pages\/Private\/Search.cshtml.cs:line 120\n   at gpconnect_appointment_checker.Pages.SearchModel.OnPostSearchAsync() in \/src\/gpconnect-appointment-checker\/Pages\/Private\/Search.cshtml.cs:line 96\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n   at gpconnect_appointment_checker.Configuration.RequestLoggingMiddleware.Invoke(HttpContext context, ILogService logService) in \/src\/gpconnect-appointment-checker\/Configuration\/Infrastructure\/Logging\/RequestLoggingMiddleware.cs:line 25\n   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)", "innerException": { "type": "System.IO.IOException", "message": "Unable to read data from the transport connection: Connection reset by peer.", "stacktrace": "   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)\n   at System.Net.Security.SslStream.FillBufferAsync[TReadAdapter](TReadAdapter adapter, Int32 minSize)\n   at System.Net.Security.SslStream.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)\n   at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)\n   at System.Net.Security.SslStream.ReadByte()\n   at Novell.Directory.Ldap.Asn1.Asn1Identifier.Reset(Stream inRenamed)\n   at Novell.Directory.Ldap.Connection.ReaderThread.Run()" } }
{ "type": "Novell.Directory.Ldap.LdapException", "message": "Connect Error", "stacktrace": "   at Novell.Directory.Ldap.Connection.WriteMessage(Message info)\n   at Novell.Directory.Ldap.Message.SendMessage()\n   at Novell.Directory.Ldap.LdapConnection.Search(String base, Int32 scope, String filter, String[] attrs, Boolean typesOnly, LdapSearchQueue queue, LdapSearchConstraints cons)\n   at Novell.Directory.Ldap.LdapConnection.Search(String base, Int32 scope, String filter, String[] attrs, Boolean typesOnly, LdapSearchConstraints cons)\n   at Novell.Directory.Ldap.LdapConnection.Search(String base, Int32 scope, String filter, String[] attrs, Boolean typesOnly)\n   at gpconnect_appointment_checker.SDS.SDSQueryExecutionService.ExecuteLdapQuery[T](String searchBase, String filter, String[] attributes) in \/src\/gpconnect-appointment-checker.SDS\/SDSQueryExecutionService.cs:line 69\n   at gpconnect_appointment_checker.SDS.SDSQueryExecutionService.ExecuteLdapQuery[T](String searchBase, String filter) in \/src\/gpconnect-appointment-checker.SDS\/SDSQueryExecutionService.cs:line 39\n   at gpconnect_appointment_checker.SDS.LdapService.GetGpProviderAsIdByOdsCodeAndPartyKey(String odsCode, String partyKey) in \/src\/gpconnect-appointment-checker.SDS\/Ldap\/LdapService.cs:line 74\n   at gpconnect_appointment_checker.Pages.SearchModel.GetSearchResults() in \/src\/gpconnect-appointment-checker\/Pages\/Private\/Search.cshtml.cs:line 126\n   at gpconnect_appointment_checker.Pages.SearchModel.OnPostSearchAsync() in \/src\/gpconnect-appointment-checker\/Pages\/Private\/Search.cshtml.cs:line 96\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\n--- End of stack trace from previous location where exception was thrown ---\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n   at gpconnect_appointment_checker.Configuration.RequestLoggingMiddleware.Invoke(HttpContext context, ILogService logService) in \/src\/gpconnect-appointment-checker\/Configuration\/Infrastructure\/Logging\/RequestLoggingMiddleware.cs:line 25\n   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\n   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)" }
ChristopherJamesMorris commented 3 years ago

As agreed, given that we are now cogniscent of specific issues with running ldap queries in the INT environment, we are closing this issue. It does not affect any other environments including LIVE.