Container didn't respond to HTTP pings on port: 8080

Niraj 45 Reputation points
2023-11-03T08:52:12.87+00:00

Hi,
I have a Django app that is containerized and its runs perfectly locally. I have pushed the image to Container Registry and have a Azure Web App pointing to this image in registry. It doesnt run on Web App.

Container rs-api-v2-test_0_0524e071 didn't respond to HTTP pings on port: 8080.

I get this error

This is my Dockerfile and docker-compose.yml conf. In the web app application settings I have also added the WEBSITES_PORT to 8080

User's image

User's image

User's image

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
454 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
925 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,271 Reputation points Microsoft Employee
    2023-11-09T22:42:03.05+00:00

    @Niraj It seems like you are having an issue with your Django app container not responding to HTTP pings on port 8080 when running on Azure Web App.

    Based on the error message, it seems like Azure Web App is trying to ping your container on port 8080 but is not receiving a response. This could be due to a few reasons:

    1. Your container is not listening on port 8080: Make sure that your Django app is listening on port 8080 inside the container. You can check this by running the container locally and making a request to http://localhost:8080. If you get a response, then your app is listening on port 8080.
    2. Your container is not starting correctly: Make sure that your container is starting correctly by checking the logs. You can do this by running the following command:
    docker logs <container-id>
    

    This will show you the logs for your container and should give you an idea of what is going wrong.

    Once you have made sure that your container is listening on port 8080 and is exposing the port correctly, you can try running the container locally again and making a request to http://localhost:8080 to make sure that everything is working correctly. If it is, then you can try deploying the container to Azure Web App again.


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.