Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

Azure WebApp deploy custom docker container - didn't respond to HTTP pings on port: 80

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.

question from:https://stackoverflow.com/questions/65907556/azure-webapp-deploy-custom-docker-container-didnt-respond-to-http-pings-on-po

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...