question

Noa-8448 avatar image
3 Votes"
Noa-8448 asked neas answered

Container didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.

I have deployed an App Service via Github Workers with node.js now i have the problem, that the node.js Application is running, but the Ports is not exposing. Can everyone give me an advice or is it possible to deactivate HTTP pings? Logs: 2020-11-19T16:19:27.439Z INFO - Initiating warmup request to container X for site X 2020-11-19T16:19:43.733Z INFO - Waiting for response to warmup request for container X. Elapsed time = 16.2938836 sec 2020-11-19T16:23:27.969Z ERROR - Container Xf for site X did not start within expected time limit. Elapsed time = 240.5298169 sec 2020-11-19T16:23:27.970Z ERROR - Container X didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging. 2020-11-19T16:23:27.980Z INFO - Stopping site X because it failed during startup. Kind regards, Noah

azure-webappsazure-webapps-content-deployment
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered DarshaniJayasekara-9038 commented

Thanks for asking question! You may want to know that If your container takes a long time to start you can increase the start time limit. The default time is 230 seconds for starting the container. To configure that, add an app setting called WEBSITES_CONTAINER_START_TIME_LIMIT and set it to the number of seconds you would like for us to wait for your container to start (up to a maximum of 1800) as shown in the image below:

41422-demo5.png


Also please ensure that your container must respond to an HTTP ping and In order for us to consider a container to be successfully started, the container must start and it must respond to an HTTP ping. If the container starts but does not respond to a ping, we will eventually log an event in the Docker log saying that it didn't start.

To resolve this.

  1. Use the EXPOSE instruction in your Dockerfile to expose port 3000.

  2. Use the WEBSITES_PORT app setting with a value of "3000" to expose that port.



Reference: https://techcommunity.microsoft.com/t5/apps-on-azure/things-you-should-know-web-apps-and-linux/ba-p/392472







demo5.png (218.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey, Thanks a lot, WEBSITES_PORT saved me. After struggling a lot finally found your answer. thanks again

0 Votes 0 ·
Noa-8448 avatar image
0 Votes"
Noa-8448 answered SnehaAgrawal-MSFT commented

Thanks for your Answer. The Application is responding in a SSH Session with a HTTP 200 OK (curl 127.0.0.1:8080). But from external the App isn't responding. Can you give me any advice on other Plattforms i don't find any answer thats seems to work. The node.js Application is binded on 0.0.0.0

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for reply! To help you better on this we would require more details hence request you send an email to AzCommunity[at]Microsoft[dot]com referencing this issue, we would like to work closer with you on this matter.

0 Votes 0 ·
marc-8366 avatar image
1 Vote"
marc-8366 answered

I am facing the same problem, saying my node js port 3000 can not be ping so the container exit even I have done following

Use the EXPOSE instruction in your Dockerfile to expose port 3000.
Use the WEBSITES_PORT app setting with a value of "3000" to expose that port.

have seen many other posts out there suggesting same solution, but setting WEBSITES_PORT does not work. My image works perfectly locally..

2021-08-14T23:01:18.250Z INFO - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2021-08-14T23:01:20.821Z INFO - Initiating warmup request to container xxxx for site xxxx
2021-08-14T23:01:20.832Z INFO - Container xxxxx for site xxxx initialized successfully and is ready to serve requests.
2021-08-14T23:01:20.832Z INFO - Initiating warmup request to container xxx for site xxx
2021-08-14T23:01:21.875Z ERROR - Container xxx for site xxx has exited, failing site start
2021-08-14T23:01:21.877Z ERROR - Container xxx didn't respond to HTTP pings on port: 3000, failing site start. See container logs for debugging.
2021-08-14T23:01:21.889Z INFO - Stopping site xxx because it failed during startup.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OddsNu-5410 avatar image
0 Votes"
OddsNu-5410 answered

We have the same issue. The container suddenly fails to restart after being online for a while and then never starts.

Have tried to set the WEBSITES_PORT (and/or) PORT to 8080 and we are exposing 8080 in our Dockerfile.

The image works perfectly locally.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

marc-8366 avatar image
0 Votes"
marc-8366 answered

I have switched to Aws instead, all the port configuration is as simple as doing network inbound rules, instead of playing around with these unexplained WESITE_PORT

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

WahbiHicham-7141 avatar image
0 Votes"
WahbiHicham-7141 answered

deploying a node app to app service is really a nightmare. I have the same symptoms above and have been trying to resolve for the last couple of weeks with no success.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

neas avatar image
1 Vote"
neas answered

I can confirm that this is really a nightmare. I have followed the tutorial here: https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-04 with my custom node js app without success. Also the WEBSITES_PORT setting is not helping at all. Why do I have to waste more than a whole day for deploying an app in Azure?? And it's still not working!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

neas avatar image
0 Votes"
neas answered

We had the above error message for a docker container and as well standard_init_linux.go:228: exec user process caused: exec format error

We have resolved it by specifying the architecture (platform) when building the app with docker (required when you running docker e.g. on a Mac).

See this comment: https://github.com/Azure/azure-sdk-for-js/issues/21572#issuecomment-1111869403 and follow this tutorial https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-04

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.