-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container didn't respond to HTTP pings on port: 80, failing site start. #46401
Comments
Thanks for your comment. We are actively investigating and will get back to you shortly. Thanks for your patience. |
When I try to deploy a windows container, I get this error message: So none of the Linux and windows containers works for me. |
@Bryankarlsson |
@Karishma-Tiwari-MSFT Well, I'm following the instructions of how to deploy a docker container to Azure: https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-docker-webapp?view=azure-devops&tabs=java |
@VikasPullagura-MSFT @Karishma-Tiwari-MSFT @femsulu the exact same issue that I have can be found here as well in the follwing started issue: I have alsoe posted a thread there. |
@Bryankarlsson, The automatic port detection detects the port (port 80 is the default), we will attempt to detect which port to bind to your container, but you can also use the WEBSITES_PORT app setting and configure it with a value for the port you want to bind to your container. However, the web server in your custom image may use a port other than 80. You tell Azure about the port that your custom container uses by using the WEBSITES_PORT app setting. In this case, yes you will have to change the App Setting configuration from the Portal. For a different port - Use the EXPOSE instruction in your Dockerfile to expose the appropriate port (E.g 3000) and use the WEBSITES_PORT app setting on Azure with a value of "3000" to expose that port. |
@AjayKumar-MSFT I'm not sure what it is that you want me to do? I have expsed port 80 in my docker file. Should that not work? Tell me exactly what you want me to test. |
@Bryankarlsson, Sorry for any confusion! In your comment on the other referenced GitHub issue "Must I set some settings in Configuration -> Application settings in Azure?" ; so in this regard, I had mentioned about using a different Port with the app setting : You can use a different port and then set the application setting with that port using WEBSITES_PORT app setting and see if that makes any difference. As per your case, by default the port 80 should work as only port 80 and 8080 are exposed ports. To isolate, we could try the following steps: For Windows Container, could you please check if the base image is 2016 and if so kindly leverage the Windows Server 2019 base image (for example: microsoft/aspnet:4.7.2-windowsservercore-ltsc2019) and check if that helps. Could you please confirm if this is your WebApp name 'webapibrajzore'? I'm unable to locate this. |
Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply here or on the other thread and we will gladly continue the discussion. |
I just ran in to this issue as well. Pretty much the same premise as OP. I can copy and paste the docker run command that Azure uses (just replacing the image for my local build name) and it works just fine. The error:
(I've obfuscated some of the service names and urls as not to expose my real values) |
I've been banging my head against this for days. But I finally figured it out. Removing the ' from the environment names variables solves the issue, this works: Both with and without the ' works in my docker desktop, but Azure fails horribly with no good error message if you have the ' I have specified these extra startup values in Web App > Container Settings > Startup File (form field), same value can be edited from Web App > Configuration > Startup Command (its the same field with a different name). |
Apologies for all the frustration with this issue and inconvenience. I will share the feedback on this internally with our product team. |
I'm very sorry, could you shed any more light on this? What is it that must be changed? |
This works locally with docker desktop: -e environment='Production' -e ASPNETCORE_ENVIRONMENT='Production' This works in Azure note the missing ' |
Facing the same issue as mentioned by @Bryankarlsson. Tried out all the suggestion but no luck as of now. Please find the container logs of the app service. 2020-09-02T17:48:32.007Z INFO - Pull Image successful, Time taken: 0 Minutes and 35 Seconds 2020-09-02T17:48:35.526Z INFO - Initiating warmup request to container thintankcoreapi_0_5aec585a for site thintankcoreapi |
Hi guys, I've been facing this issue for a couple of days, and finally, I got a solution, I've created a detailed repository with a github workflow that actually works to deploy using azure/webapps-deploy@v2 action. The repo specifies some of the problems that I resolved for my basic node.js application hope it can help someone, 'cause this was a little bit confusing |
irvv17, Thanks for sharing the solution that worked for you with the community. Apologies for all the confusion. We'll work on adding additional clarity/with author's review. |
I am still facing this issue: This is a multi-container image. I am deploying an API written in Python to Linux using Docker Compose, Azure Container Registry and Azure App Service. Right now I cannot get my container to respond to HTTP pings once it is pushed to the Azure Container Registry. I do have Managed Identity turned on ,per this tutorial, to make sure the web app has access to the container registry: https://docs.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux Here are my container logs from the failure: 2021-06-27T10:17:41.945Z INFO - docker run -d -p 9397:8080 --name fastapi_0_1501791b -e PORT=8080 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=8080 -e WEBSITE_AUTH_ENABLED=False (remainder omitted) 2021-06-27T10:17:46.225Z INFO - Initiating warmup request to container fastapi_0_1501791b_msiProxy for site fastapi_0_1501791b 2021-06-27T10:17:46.444Z INFO - Container fastapi_0_1501791b_msiProxy for site fastapi initialized successfully and is ready to serve requests. What am I missing? How do I get the deployed container to respond to HTTP pings? Here is my Dockerfile ... FROM python:3.8.8-slim-buster create the app userRUN addgroup --system app && adduser --system --group app create the appropriate directoriesENV HOME=/home/app set environment variablesENV PYTHONDONTWRITEBYTECODE 1 install system dependenciesRUN apt-get update install python dependenciesRUN python3 -m pip install --upgrade pip add filesCOPY . . expose portEXPOSE 8080 chown all the files to the app userRUN chown -R app:app $APP_HOME change to the app userUSER app run gunicorn and start ssh serviceCMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"] And my docker-compose.yml ... version: '3.8' services: I know this is a lot of detail to send but I have tried all the options I've seen online in forums like this to solve the issue and nothing has worked out for me, so I am wondering if there is something more to my configuration that is awry. Any ideas? Thank you in advance. |
I m facing the same issue as well. 2023-01-15T03:57:32.020Z INFO - Pull Image successful, Time taken: 0 Minutes and 2 Seconds 2023-01-15T03:57:33.802Z INFO - Initiating warmup request to container w2b-dev-api_0_ed8f04dc_msiProxy for site w2b-dev-api I followed some suggestion like add the WEBSITES_PORT configuration and I added 80 as the value for it, but it didnt work anyway. |
Hi all, I'm using python runtime to deploy a http service via vscode and encountering this error. Finally I fix this error in my project thanks for all the existed information about this issue. The way I fix this error is to "Fix Python packages".
|
I have an docker image containing a .NET Core 3.0 API application that I have pushed to docker hub.
Dockerfile
Inside of Azure, i'm creating a Web app for containers. However, the container seems to fail to start according to the logs:
I have tried to set both PORT and WEBSITES_PORT to 80 in the configuration, but it don't work.
Edited: Added doc details
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: