How can I fix a container that fails to start in Azure App Service?

Gawaskar 20 Reputation points
2024-11-03T16:39:46.1033333+00:00

We are using NestJS for our back-end service, which has been running reliably for the past three years with the start command npm run start:qa and App Service Node version 20. I typically deploy the code using VS Code’s remote service, but the latest deployment failed. However, Azure logs now indicate a failure to start the application.

Log Stream

INFO  - Starting container for site

INFO  - docker run -d -p 4159:4203 --name mmac-qaapp_0_ff246e93 -e WEBSITE_USE_DIAGNOSTIC_SERVER=true -e PORT=4203 -e WEBSITE_SITE_NAME=mmac-qaapp -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=mmac-qaapp.azurewebsites.net -e WEBSITE_INSTANCE_ID=4f7f9c220a4db25ee90a2ef6fa05bfd0a6bf89a64f74e6652d326553e672989c appsvc/node:20-lts_20240819.2.tuxprod REDACTED

INFO  - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.

INFO  - Initiating warmup request to container mmac-qaapp_0_ff246e93 for site mmac-qaapp

INFO  - Waiting for response to warmup request for container mmac-qaapp_0_ff246e93. Elapsed time = 16.9893417 sec

INFO  - Waiting for response to warmup request for container mmac-qaapp_0_ff246e93. Elapsed time = 36.1905157 sec

INFO  - Waiting for response to warmup request for container mmac-qaapp_0_ff246e93. Elapsed time = 55.7972945 sec

ERROR - Container mmac-qaapp_0_ff246e93 for site mmac-qaapp has exited, failing site start

ERROR - Container mmac-qaapp_0_ff246e93 didn't respond to HTTP pings on port: 4203, failing site start. See container logs for debugging.

INFO  - Stopping site mmac-qaapp because it failed during startup.

Can you provide a solution to resolve this issue?

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

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2024-11-04T06:36:31.0133333+00:00

    @Gawaskar Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.

    As mentioned in the error message could you please enable diagnostic logging (application logs) in app service and review the container logs(using log stream) to troubleshoot this issue further.

    You reference this techcommunity blog post to troubleshoot container issues on linux app service.

    Hope this helps, let me know if you have any further questions on this.

    0 comments No comments

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.