aspnetcore: ANCM PostStartCheck Failure
We host instances of a .Net Core 3.1 application on ~500 different servers, using the Out Of Process model and serving the application through IIS. As part of our deployment, we install the .Net Core hosting bundle to ensure compatibility, currently we’re rolling out v3.1.22.
Older versions, and those installed by other means, are not removed from the servers, so there is a mix across those servers of the versions of the hosting bundle installed.
The IIS process is started on-demand, with an idle timeout of 20 minutes. We also perform a restart when a deployment occurs.
Over the last few months we have been seeing sporadic instances where our application is failing to startup, and we’re getting very little information about the failures. We typically see the following in event viewer;
Application 'REDACTED' with physical root 'REDACTED' failed to start process with commandline '"dotnet" .\Auth.Web.dll' at stage 'PostStartCheck', ErrorCode = '0x8027025a', assigned port 39890, retryCounter '1'.
Running the command manually always works, and the issue is normally resolved by restarting the app pool - though sometimes this resolves itself (anywhere from half an hour to a few hours later).
We host multiple instances on each server, and as we cannot limit the amount of logs produced by stdout, leaving this enabled in-case we see this problem is a hard-sell.
A couple of questions;
- Do I have any other options in debugging this, or am I going to have to enable stdout on select servers and hope I hit the right ones?
- Where can I lookup the error code meaning,
0x8027025a? - Enabling
CORE_HOSTtracing only works when the app is ran from the command line, and we’ve only ever seen this issue when running through IIS - How can we enable CORE_HOST tracing when running through IIS?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (14 by maintainers)
Sorry, I think the issue transfer screwed up some of the automatic notifications. @adityamandaleeka could you help route? I took my best guess on labels here 😃
Sorry, I have no expertise in how IIS executes .NET apps, I’ll have to find someone else to give advice.
Milestone is just so it doesn’t get lost. Everything under current investigation is under the 7.0 milestone
This isn’t my area - @agocke will have to answer
Also
COREHOST_TRACE_FILEwill write to a file, instead of standard outCan you set COREHOST_TRACE=1? (See full details here)
I think that mostly traces startup/assembly load, so if the processes are fairly persistent it shouldn’t make a great deal of content. Perhaps you can script it to delete the log before each fresh startup.
Via Convert HRESULT to a human-friendly error (PowerShell),
0x8027025aequates to “The app didn’t start in the required time.”.