Container didn't respond to HTTP pings on port: 8080, failing site start.

Peyman NJ 1 Reputation point
2020-11-24T18:07:47.113+00:00

Hi,

We have 2 Azure web apps on linux. The shared service plan between them is B1. The applications are 2 web API projects in .Net core 3.1. (Self-contained).
The Azure web app resources on the cloud have been created with the diffault settings.

The applications worked good for almost 2 months. They stopped to work from yesterday.

These are what I have done so far:
1- Running the applications on local machine (debug/release) and they work fine.
2- Deploying the apps on Azure web app on windows. They work fine.
3- Created a default web api sample in VS 2019 and deployed on the problematic resource (Azure web app on linux) and it didn't work.
4- Checked the logs in Kudu which is not clear for me.
5- Extended the container start time configuration to max (using the environment variable WEBSITES_CONTAINER_START_TIME_LIMIT) and didn't help.
6- Delete linux app services + service plan. Recreated them and deployed the apps again. They start to work and stopped again.

2020-11-24T17:05:50.545977734Z   _____                               
2020-11-24T17:05:50.546005436Z   /  _  \ __________ _________   ____  
2020-11-24T17:05:50.546010636Z  /  /_\  \___   /  |  \_  __ \_/ __ \ 
2020-11-24T17:05:50.546014736Z /    |    \/    /|  |  /|  | \/\  ___/ 
2020-11-24T17:05:50.546018537Z \____|__  /_____ \____/ |__|    \___  >
2020-11-24T17:05:50.546022537Z         \/      \/                  \/ 
2020-11-24T17:05:50.546026437Z A P P   S E R V I C E   O N   L I N U X
2020-11-24T17:05:50.546029938Z 
2020-11-24T17:05:50.546033438Z Documentation: http://aka.ms/webapp-linux
2020-11-24T17:05:50.546036938Z Dotnet quickstart: https://aka.ms/dotnet-qs
2020-11-24T17:05:50.546046439Z ASP .NETCore Version: 3.1.8
2020-11-24T17:05:50.546049939Z Note: Any data outside '/home' is not persisted
2020-11-24T17:05:50.978636234Z Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll     -bindPort 8080 -userStartupCommand '' 
2020-11-24T17:05:51.294160111Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-11-24T17:05:51.294792661Z Could not find operation ID in manifest. Generating an operation id...
2020-11-24T17:05:51.295346704Z Build Operation ID: 90fe94f0-c8c0-40ce-868d-6155c8d252d0
2020-11-24T17:05:53.042694509Z Writing output script to '/opt/startup/startup.sh'
2020-11-24T17:05:53.781145028Z Trying to find the startup DLL name...
2020-11-24T17:05:53.781179331Z Found the startup D name: XXXXXXXXXX.dll
2020-11-24T17:05:53.781189032Z Running the command: dotnet "XXXXXXXXXX.dll"


2020-11-24T17:09:40.420Z ERROR - Container XXXXXXXXXX_0_1aa19225 for site XXXXXXXXXX did not start within expected time limit. Elapsed time = 230.0501104 sec
2020-11-24T17:09:40.423Z ERROR - Container XXXXXXXXXX_0_1aa19225 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2020-11-24T17:09:40.524Z INFO  - Stopping site XXXXXXXXXX because it failed during startup.

List of Nuget packages that we are using

  <ItemGroup>
    <PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="3.1.2" />
    <PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.0.2" />
    <PackageReference Include="Azure.Identity" Version="1.3.0" />
    <PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.1.0" />
    <PackageReference Include="Azure.Storage.Blobs" Version="12.7.0" />
    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.16.0" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.10" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.2.0" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="FluentValidation.AspNetCore" Version="9.3.0" />
    <PackageReference Include="MongoDB.Driver" Version="2.11.4" />
    <PackageReference Include="AutoMapper" Version="10.1.1" />
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.0" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
    <PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
    <PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
    <PackageReference Include="Serilog.Sinks.ApplicationInsights" Version="3.1.0" />

    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>

    <PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />

We Have no idea how to solve this issue(s) and we are not sure if the issue is related to our codes or if it is a temporary issue on Azure cloud.
Appreciate any help or hints.

Thanks.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,756 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Peyman NJ 1 Reputation point
    2020-11-26T17:58:52.69+00:00

    Hi @Ryan Hill ,

    Thanks for replying.

    • Locally it runs as usual and fast.
    • I don't do database connection at startup class
    • The log just say Azure cannot ping the port and no extra information. (Internal Azure health check)

    1 hour ago I noticed that Microsoft updated the build pipeline with .Net 5. And our Azure web apps on linux support .Net core 3.1
    Therefore, I defined the DotnetCore version explicitly in our build pipeline :

    steps:

    • task: UseDotNet@2
      inputs:
      version: '$(dotNetCoreVersion)'
      packageType: sdk
      continueOnError: false

    dotNetCoreVersion is 3.1.404.

    And deployed the projects again.
    Seems everything is working and I enabled App-Insights/Availability based on our health check endpoints. (Interval 5 minutes)

    I didn't get any issue yet.
    Hopefully the solution solved the issue and I am not sure yet. Because application always started to work for short time and stopped again before my changes in build pipeline.

    I will update this thread to confirm the solution. But If you have any hints please shoot.

    Again thanks.

    Best regards,
    Peyman


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.