Skip to content
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. See container logs for debugging. #62946

Closed
aqua-rotala opened this issue Sep 21, 2020 · 4 comments

Comments

@aqua-rotala
Copy link

I have a Docker Image of a Net Core 3.1 application which I have pushed to Azure Container Registry.

ERROR
Container webapplication03-dev_0_403efc17 for site webapplication03-dev has exited, failing site start ERROR - Container webapplication03-dev_0_403efc17 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

I have exposed port 80 in the DOCKERFILE.

DOCKERFILE

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["WebApplication3/WebApplication3.csproj", "WebApplication3/"]
RUN dotnet restore "WebApplication3/WebApplication3.csproj"
COPY . .
WORKDIR "/src/WebApplication3"
RUN dotnet build "WebApplication3.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "WebApplication3.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication3.dll"]

Any ideas why I get the error?

@psmanhas
Copy link
Contributor

@debopam-alinta Thank you for sharing your query! We are currently investigating and will get back to you shortly on this.

@psmanhas
Copy link
Contributor

@debopam-alinta 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.

Same issue has been reported here as well and you can check this thread for more information.

Hope it help !!!

@psmanhas
Copy link
Contributor

@debopam-alinta Hope the provided information is helpful.

We will now close this issue. If there are further questions regarding this, please tag me in a comment. I will reopen it and we will continue the discussion.

@irving-caamal
Copy link

irving-caamal commented May 31, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants