Getting an application error while trying to start my web-app.

Ayush Verma 20 Reputation points
2024-03-13T09:28:01.6666667+00:00
Container add-product-appa2_0_197c3c4b for site add-product-appa2 did not start within expected time limit. Elapsed time = 230.7082948 sec
2024-03-13T09:16:37.168Z ERROR - Container add-product-appa2_0_197c3c4b didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2024-03-13T09:16:37.305Z INFO  - Stopping site add-product-appa2 because it failed during startup.

I had tried following already

  • setting WEBSITES_PORT = 8080
  • setting PORT = 8080
  • #EXPOSE PORT
  1. ENV LISTEN_PORT=8080
  2. EXPOSE 8080
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,833 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grmacjon-MSFT 15,606 Reputation points
    2024-04-09T19:55:51.75+00:00

    Hi @Ayush Verma like Hossein mentioned above, it will be hard to find the specific cause of this issue without more information from your container logs.

    The error message suggests looking at the container logs for debugging clues. Access the container logs using Azure Portal or Azure CLI commands like az container logs --name add-product-appa2_0_197c3c4b. The logs might reveal specific errors preventing your application from starting. Look for exceptions, startup failures, or missing dependencies.

    since you've already tried setting environment variables to expose port 8080, I recommend making sure the environment variable name (e.g., WEBSITES_PORT or PORT) matches what your application expects.

    also, what is your start command? If you’re using a start command like pm2 start server.js, try changing it to node server.js.

    Best,

    Grace

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. hossein jalilian 1,750 Reputation points
    2024-03-13T20:42:24.7333333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    Given the data you provided, it's impossible to pinpoint the source of the problem without access to the container logs.

    Please send the latest logs related to the container. You can retrieve them using the following command:

    docker logs --
    

    Kindly send the logs here for further investigation.

    1 person found this answer helpful.
    0 comments No comments