Ausnahme des Application Gateway-Standardintegritätstests „ECONNRESET“

Ausnahme des Application Gateway-Standardintegritätstests „ECONNRESET“

Wir haben ein Anwendungsgateway vor unserer Webanwendung auf einer Azure-VM konfiguriert. Wir haben regelmäßig ECONNRESET-Ausnahmen festgestellt, die anscheinend als Ergebnis der standardmäßigen Integritätsprüfung generiert werden. Ich kann alle 30 Sekunden einige Anfragen an 127.0.0.1 sehen. In relativ regelmäßigen Abständen (mehr als 20 Fälle in den letzten 24 Stunden) führt eine dieser Anfragen zu einer ECONNRESET-Ausnahme gemäß der folgenden Ausgabe:

17:10:35 [Information] () "Request starting HTTP/1.1 GET http://127.0.0.1/  "

17:10:35 [Information] () {"Connection":["Keep-Alive"],"Host":["127.0.0.1"],"Max-Forwards":["10"]}

17:10:35 [Information] () Executing action method "HonestyBoxWeb.Controllers.HomeController.Index (HonestyBoxWeb)" with arguments (null) - ModelState is Valid

17:10:35 [Information] () Executing ViewResult, running view at path "/Views/Home/Index.cshtml".

17:10:35 [Information] () Executed action "HonestyBoxWeb.Controllers.HomeController.Index (HonestyBoxWeb)" in 2.8666ms

17:10:35 [Information] () "Request finished in 5.2758ms 200 text/html; charset=utf-8"

17:10:35 [Information] () Connection id ""0HLCE7PIFCIGH"" request processing ended abnormally.
System.IO.IOException: Error -104 ECONNRESET connection reset by peer ---> Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -104 ECONNRESET connection reset by peer
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvOutputConsumer.<WriteOutputAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.LibuvConnection.<Start>d__26.MoveNext()
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.<ProcessRequestsAsync>d__2.MoveNext()

Es sieht also so aus, als ob der Healthcheck eine Anfrage sendet und dann die Verbindung zurücksetzt. Interpretiere ich das richtig und gibt es eine Möglichkeit, das Problem zu lösen?

Antwort1

Dies war ein Problem im Kestrel-Server und wurde in der Version 2.1 von dotnet core behoben.

Referenz:https://github.com/aspnet/KestrelHttpServer/issues/2540

verwandte Informationen