Azure Web App on Linux: “Error: Container didn't respond to HTTP pings on port: 8080” - when using: “start”: “pm2 start server.js”

后端 未结 3 710
-上瘾入骨i
-上瘾入骨i 2021-01-13 15:31

My App Service Linux instance crashes if my node app is using the start script: \"start\": \"pm2 start server.js\":

2019-04-15 11:36:34.432 ERRO         


        
3条回答
  •  不知归路
    2021-01-13 15:34

    Are we trying to ping on PORT 8080? The problem here is that port 8080 is not exposed, so when we attempt to ping the container, we aren't pinging on a port on which the container is listening.

    There are a couple of ways to resolve this.

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

    You can refer the below mentioned articles:

    https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment?view=azure-devops

    https://blogs.msdn.microsoft.com/waws/2017/09/08/things-you-should-know-web-apps-and-linux/

提交回复
热议问题