azure-sdk-for-js: Container nodes webAppestapp_0_2ab2aa8a didn't respond to HTTP pings on port: 3000, failing site start.

Describe the bug When you deploy the app according to the documentation, you receive the error: Container testapp_0_2ab2aa8a didn’t respond to HTTP pings on port: 3000, failing site start. Stopping site testapp because it failed during startup.

To Reproduce Steps to reproduce the behavior:

  1. Start the tutorial here: https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-01
  2. Create docker image: https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-04
  3. Deploy app: https://docs.microsoft.com/en-us/azure/developer/javascript/tutorial/tutorial-vscode-docker-node/tutorial-vscode-docker-node-05

Expected behavior View the web site in a browser (Getting a running app version as in the tutorial)

Screenshots If applicable, add screenshots to help explain your problem.

Website Screenshot 2022-04-22 at 21 27 48

2022-04-22T19:15:44  Welcome, you are now connected to log-streaming service.
Starting Log Tail -n 10 of existing logs ----
/home/LogFiles/__lastCheckTime.txt  (https://h21testapp.scm.azurewebsites.net/api/vfs/LogFiles/__lastCheckTime.txt)
4/22/2022 7:14:48 PM
/home/LogFiles/kudu/trace/f694b1344245-f78b4563-37e0-487e-93c3-04f2eed0403f.txt  (https://h21testapp.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/f694b1344245-f78b4563-37e0-487e-93c3-04f2eed0403f.txt)
2022-04-22T19:14:29  Startup Request, url: /api/vfs/site/wwwroot/?_=1650654812800, method: GET, type: request, pid: 67,1,6, ScmType: None
/home/LogFiles/2022_04_22_RD0003FF8A4221_default_docker.log  (https://h21testapp.scm.azurewebsites.net/api/vfs/LogFiles/2022_04_22_RD0003FF8A4221_default_docker.log)
2022-04-22T19:14:45.271578119Z standard_init_linux.go:228: exec user process caused: exec format error
2022-04-22T19:15:05.220659958Z standard_init_linux.go:228: exec user process caused: exec format error
/home/LogFiles/2022_04_22_RD0003FF8A4221_docker.log  (https://h21testapp.scm.azurewebsites.net/api/vfs/LogFiles/2022_04_22_RD0003FF8A4221_docker.log)
2022-04-22T19:15:00.651Z INFO  - docker run -d -p 6443:3000 --name h21testapp_0_2ab2aa8a -e WEBSITE_SITE_NAME=h21testapp -e WEBSITE_AUTH_ENABLED=False -e PORT=3000 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=h21testapp.azurewebsites.net -e WEBSITE_INSTANCE_ID=faf4dec0e866a78a704d6f50882bec16fc24fe887063009bbdffd2526cac326f h21testreg.azurecr.io/jse2eexpressserver:latest
2022-04-22T19:15:00.653Z INFO  - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2022-04-22T19:15:05.325Z INFO  - Initiating warmup request to container h21testapp_0_2ab2aa8a_msiProxy for site h21testapp
2022-04-22T19:15:05.335Z INFO  - Container h21testapp_0_2ab2aa8a_msiProxy for site h21testapp initialized successfully and is ready to serve requests.
2022-04-22T19:15:05.341Z INFO  - Initiating warmup request to container h21testapp_0_2ab2aa8a for site h21testapp
2022-04-22T19:15:06.442Z ERROR - Container h21testapp_0_2ab2aa8a for site h21testapp has exited, failing site start
2022-04-22T19:15:06.496Z ERROR - Container h21testapp_0_2ab2aa8a didn't respond to HTTP pings on port: 3000, failing site start. See container logs for debugging.
2022-04-22T19:15:06.535Z INFO  - Stopping site h21testapp because it failed during startup.
Ending Log Tail of existing logs ---
Starting Live Log Stream ---
2022-04-22T19:15:55    Outgoing response, type: response, statusCode: 404, statusText: NotFound
2022-04-22T19:15:53    Outgoing response, type: response, statusCode: 404, statusText: NotFound
2022-04-22T19:17:44  No new trace in the past 1 min(s).

Additional context There seems to be a problem with the web port exposing. However, also the feedback from another guide didn’t help: https://docs.microsoft.com/en-us/answers/questions/168746/container-didn39t-respond-to-http-pings-on-port-80.html

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

This is seriously frustrating please can MSFT actually provide a turorial that works and that they have tested been wasting hours now, going to try on AWS as this basic stuff should not be such a struggle…

I was able to resolve the issue via specifying the correct architecture: docker buildx build --platform linux/amd64 --rm --pull -f Dockerfile … Maybe you should mention this in the tutorial.

The workaround I have selected for vscode was to use buildx as default. https://github.com/microsoft/vscode-remote-release/issues/1409#issuecomment-532075571 Furthermore I had to specify the platform in .vscode/tasks.json

....
"type": "docker-build",
"label": "docker-build",
"platform": "node",
"dockerBuild": {
    "dockerfile": "${workspaceFolder}/Dockerfile",
    "context": "${workspaceFolder}",
    "pull": true,
    "tag": "REGISTRYNAME.azurecr.io/IMAGENAME:latest",
    // add this and run "docker buildx install" once to activate buildKit alias (buildx)
    "customOptions": "--platform linux/amd64 --push"
}
...