0
votes

I have next problem: I've created in Azure Portal new App Service, and deployed docker image of python.(selected Sigle Container). Docker exposes port 80. But when app starting, I see in logs:

  • docker run -d -p 80:80 --name testapp_0_d29666fc -e PORT=80 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=80 -e WEBSITE_SITE_NAME=testapp -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=testapp.azurewebsites.net -e WEBSITE_INSTANCE_ID=56644775937494 test.azurecr.io/papythonapp
  • Initiating warmup request to container app_0_d29666fc for site app 2021-01-26T18:14:54.253Z
  • INFO Waiting for response to warmup request for container app_0_d29666fc. Elapsed time = 15.8435456 sec
  • 2021-01-26T18:15:11.162Z INFO - Waiting for response to warmup request for container app_0_d29666fc. Elapsed time = 32.7520746 sec
  • 2021-01-26T18:15:27.310Z INFO - Waiting for response to warmup request for container app_0_d29666fc. Elapsed time = 48.9000044 sec
  • 2021-01-26T18:15:43.558Z INFO - Waiting for response to warmup request for container app_0_d29666fc. Elapsed time = 65.126849 sec
  • 2021-01-26T18:15:59.240Z ERROR - Container app_0_d29666fc for site app did not start within expected time limit. Elapsed time = 281.0332009 sec
  • 2021-01-26T18:20:13.696Z ERROR - Container app_0_d29666fc didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

I have found few solution to add in AppSettings PORT and/or WEBSITES_PORT 80 or 3000, and this resolve issue. But error still here. I have added and exposed ports, removed, changed...nothing helps. My app service is in VNET, and maybe with it have some problems. Application is starting, works few seconds and then stoping by Azure.

All solutions which I have found didn't helps me.

P.S. Test .NET Core App works fine when I deployed with the same way.

SOLUTION: My python app up so slowly and thats why port ping not responded. I commented few libs and it works. i did some refactor and up time of my service became shorter. Also do not forget to open WEBSITES_PORT as your EXPOSE port in Dockerfile.

1
Can you share the Dockerfile of your image and do you deploy the app service with a single image in the portal? Or what is the method you use to deploy the image to the app service?Charles Xu
I selected Docker image from my azure registry. EXPOSE 3000 80 This ports are exposed in dockerfile. Also added into app settings PORT=80 and WEBSITES_PORT=80.Roma Pavliuk
Issue was with some settings of my application. ResolvedRoma Pavliuk
If you solve it yourself, you can add an answer to display the solution and that would be helpful to others.Charles Xu
Thanks, added. Hope this will help for other guys)Roma Pavliuk

1 Answers

0
votes

SOLUTION: My python app up so slowly and thats why port ping not responded. I commented few libs and it works. i did some refactor and up time of my service became shorter. Also do not forget to open WEBSITES_PORT as your EXPOSE port in Dockerfile.