12

We have multiple AspNetCore applications hosted on an Azure Web App as OutOfProcess and deployed as virtual applications with separate paths.

We have the same setup in different environments, all infrastructure and applications are deployed automatically through our pipeline but it's only breaking in one environment and we can't find out why.

We have tried turning on stdoutLogEnabled to true. This reveals an invalid runtime.config.json error, I have read this can be caused by multiple issues but we can't identify any reason for it. We also intermittently see a 502.5 ANCM startup failure when navigating to the swagger URL for each application.

If we look in the application event logs in the Azure portal we are seeing this error failed to start process with command line 'dotnet .\<DLL>' with multiple retries. Failed to bind to port <PortNumber>

We can start the applications locally with Kudu by navigating to the location of the DLL and running dotnet <DLL>. The application starts successfully so it seems to be a problem on the web app. We've tried restarting and stopping and starting the web app, even tried scaling the app service to attempt getting a clean start but nothing has succeeded.

I'm not sure what other steps we can take to diagnose this issue or what we might have done wrong as the same applications are working fine in other environments.

Sean K
  • 161
  • 5
  • 1
    It's been a long time since I used app services, but how is the apps running? I mean are they all running on the same "virtual machine"? Because the error indicates that it can't bind to a port,meaning there's another app running on the same one. Do your apps specify a port? Are you running on Linux or Windows? finally Maybe you can enable this logger: https://learn.microsoft.com/en-us/azure/app-service/configure-language-dotnetcore?pivots=platform-linux#access-diagnostic-logs – jpgrassi May 05 '21 at 09:27
  • Another thing maybe could be the target framework, which version are you running? Is it installed on the App service machine? https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-5.0#5025-process-failure – jpgrassi May 05 '21 at 09:29
  • Can you check the number of threads open up in App Insights, that may help. – Biplab Sah May 08 '21 at 12:05
  • Can you open the command line on the Azure Web App and run `dotnet` to see if dotnet SDK is installed or check if the version is the correct one and in the error you show did you get an `ErrorCode` ? That might help :) – Max May 11 '21 at 10:08

1 Answers1

0

You can try opening the console in the app service.

enter image description here

  1. Type "dir"

  2. Look for your site with the extension ".exe"

  3. Type in your sitename (with the extension)

  4. Then, hit enter. It should show you some errors.

ランス
  • 418
  • 2
  • 8