Run a single container app on azure from a private docker image returns: :( Application Error

I'm looking to use azure web apps service to run a multiple containers app, but I'm starting for the simpler case which is to run a single container for an image that it's already working as a container instance.

For now I'm doing this deployment from the web site instead of using the CLI

enter image description here

When I visit the site url I get this error:

enter image description here

From the container settings section I get this message:

2019-12-21 15:45:15.759 INFO  - Waiting for response to warmup request for container policy-recomd_0_31cfeac3. Elapsed time = 212.2003193 sec
2019-12-21 15:45:30.845 INFO  - Waiting for response to warmup request for container policy-recomd_0_31cfeac3. Elapsed time = 227.2867951 sec
2019-12-21 15:45:33.875 ERROR - Container policy-recomd_0_31cfeac3 for site policy-recomd did not start within expected time limit. Elapsed time = 230.3163708 sec
2019-12-21 15:45:33.876 ERROR - Container policy-recomd_0_31cfeac3 didn't respond to HTTP pings on port: 5100, failing site start. See container logs for debugging.
2019-12-21 15:45:33.887 INFO  - Stoping site policy-recomd because it failed during startup.

EDIT This is the image menu I get for the app:

enter image description here

I added the port number to the configuration but still not working:

enter image description here

Upvotes: 3

Views: 1512

Answers (2)

Charles Xu
Charles Xu

Reputation: 31462

When you deploy a single image to the Web App, you do not need to add the environment variable for the port which needs to expose, it will be automatically detected if you already expose the port in the Dockerfile. You can take a look at the first way in the troubleshooting for NoPing. You can also use the second way, but it's not necessary.

Upvotes: 0

Sajeetharan
Sajeetharan

Reputation: 222722

This is a limitation of the Azure Web App, it only supports to expose the port 80 and 443. You need to expose port 80 and 5100 in the Dockerfile and finally in Azure App Application Settings add two new variables, PORT=5100 and WEBSITES_PORT=80.

Upvotes: 2

Related Questions