Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch - Heroku

后端 未结 8 652
情话喂你
情话喂你 2020-12-31 11:39

I am trying to deploy my server on heroku. I got this error:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
<         


        
8条回答
  •  误落风尘
    2020-12-31 12:21

    Simple solution:

    web: java -Dserver.port=$PORT $JAVA_OPTS -jar target/myapi-1.0.0.jar
    

    Replace myapi-1.0.0 with the name of your jar or use *

    Note: The order of the variables matter. For example: the following doesn't work.

    web: java $JAVA_OPTS -Dserver.port=$PORT -jar target/myapi-1.0.0.jar
    

提交回复
热议问题