Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebClient session randomly dying - oauth2 - multiple containers #3822

Open
ChrisChristophers opened this issue Feb 4, 2025 · 1 comment
Open
Assignees

Comments

@ChrisChristophers
Copy link

ChrisChristophers commented Feb 4, 2025

Describe the issue

Users connected to Business Central through the WebClient randomly get this error during their active session

Image

Full output of scripts
The EventLog always throws 3 Errors, starting with this one

Image

`

Server instance: BC Category: Security ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: 00000000-0000-0000-0000-000000000000 ServerSessionUniqueId: 00000000-0000-0000-0000-000000000000 ServerActivityId: 00000000-0000-0000-0000-000000000000 EventTime: 02/04/2025 13:08:08 Message (NavServerSessionRemovedException): RootException: NavServerSessionRemovedException (HResult: 0x80131500) CallerStackTrace: at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PushPopCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation, Boolean useCoreWcfFaultException) at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator[T](Category telemetryCategory, ServiceOperationContext context, ServiceOperation`1 innerOperation) at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationTracer.TraceScopeCombinator[T](Category telemetryCategory, ServiceOperationContext context, ServiceOperation`1 innerOperation) at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass7_0`1.<<PerformanceCounterCombinator>b__0>d.MoveNext() at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.<>c__DisplayClass7_0`1.<PerformanceCounterCombinator>b__0() at Microsoft.Dynamics.Nav.Runtime.NavPerformanceCounterSetter.UpdatePerformanceCountersWithAverageServiceOperationAction(Func`1 action, NavSession session) at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PerformanceCounterCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.PerformanceCounterCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.InitClientTelemetryIdsCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.InitClientTelemetryIdsCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TlsClearCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at _Diag_.Net._Async_Internals_() at Microsoft.Dynamics.Nav.Service.ServiceOperationPipeline.TlsClearCombinator[T](ServiceOperationContext context, ServiceOperation`1 innerOperation) at Microsoft.Dynamics.Nav.Service.AspNetCore.ClientService.ServiceOperationPipelineDispatchProxy`1.Invoke(MethodInfo targetMethod, Object[] args) at generatedProxy_1.CloseForm(CloseFormRequest) at InvokeStub_generatedProxy_1.CloseForm(Object, Span`1) at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at StreamJsonRpc.TargetMethod.InvokeAsync(CancellationToken cancellationToken) at _Diag_.Net._Async_Internals_() at System.Threading.QueueUserWorkItemCallback`1.Execute() at _Diag_.Net._Async_Internals_() ProcessId: 13248 Tag: 000001W ThreadId: 209 ExecutionId: 2234 CounterInformation: CustomParameters: { } GatewayCorrelationId: 
`

Additional context

  • currently BC 25.3
  • We are using Oauth2 and 2 containers on different windows server 2022 machines connected to the same database.
  • the error only appears when we're running more than one container behind our Loadbalancer
@freddydk
Copy link
Contributor

freddydk commented Feb 4, 2025

Sorry, but I cannot help you with this one, it is likely a load balancer problem (as you allude to yourself) - Business Central needs sticky connections - you cannot just continue a session on a different server, so the load balancer needs to be setup correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants