Hi,
We started receiving this SocketExceptions after we updated the .Net version from 3.1 to 6, and restart was required to fix it.
This is an intermittent error.
Previously in the .Net Core 3.1 this error did not occur.
Configuration
- .NET 6
- Kubernetes in AWS EKS
The exception we are getting is :
ErrorMessage: System.Net.Http.HttpRequestException: Unknown socket error (extsvc:80)<br/> ---> System.Net.Sockets.SocketException (0xFFFDFFFE): Unknown socket error<br/> at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)<br/> at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)<br/> at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)<br/> --- End of inner exception stack trace ---<br/> at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)<br/> at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)<br/> at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)<br/> at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)<br/> at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)<br/> at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)<br/> at Moh.Cas.Composite.ClaimProcessing.Application.Services.PRSClient.GetDoctorSpecialties(String[] smcNumbers) in /app/Moh.Cas.Composite.ClaimProcessing.Application/Services/PRSClient.cs:line 37<br/> at Moh.Cas.Composite.ClaimProcessing.Application.Features.Claims.Commands.ClaimEntityCreateCommandHandler._GetSpecialties(String[] smcNumbers) in /app/Moh.Cas.Composite.ClaimProcessing.Application/Features/Claims/Commands/ClaimEntityCreateCommand.cs:line 109<br/> at Moh.Cas.Composite.ClaimProcessing.Application.Features.Claims.Commands.ClaimEntityCreateCommandHandler._CreateOrDeleteDoctorSpecialties(List`1 smcNumbers) in /app/Moh.Cas.Composite.ClaimProcessing.Application/Features/Claims/Commands/ClaimEntityCreateCommand.cs:line 155<br/> at Moh.Cas.Composite.ClaimProcessing.Application.Features.Claims.Commands.ClaimEntityCreateCommandHandler.Handle(ClaimBulkCreateRequestDto request, CancellationToken cancellationToken) in /app/Moh.Cas.Composite.ClaimProcessing.Application/Features/Claims/Commands/ClaimEntityCreateCommand.cs:line 96<br/> at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken)<br/> at Moh.Cas.Composite.ClaimProcessing.Application.Validators.ValidationBehaviour`2.Handle(TRequest request, RequestHandlerDelegate`1 next, CancellationToken cancellationToken) in /app/Moh.Cas.Composite.ClaimProcessing.Application/Validators/ValidationBehaviour.cs:line 32<br/> at Moh.Cas.Composite.ClaimProcessing.Events.Listeners.ClaimInboundUcfmsg2EventHandler.RunAsync(EventRequest eventRequest) in /app/Moh.Cas.Composite.ClaimProcessing/Events/Listeners/ClaimInboundUcfmsg2EventHandler.cs:line 198