Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Heroku上的Typesafe激活程序绑定到端口时出错_Java_Heroku_Playframework 2.0_Typesafe Activator - Fatal编程技术网

Java Heroku上的Typesafe激活程序绑定到端口时出错

Java Heroku上的Typesafe激活程序绑定到端口时出错,java,heroku,playframework-2.0,typesafe-activator,Java,Heroku,Playframework 2.0,Typesafe Activator,我刚刚用Play 2.3.8将旧的Play 2.1应用程序更新为新的Typesafe Activator。我注意到该应用程序现在似乎在项目的根目录中有一个activator启动器。我正在尝试在Heroku上部署应用程序,并出现以下错误: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 我的proc文件如下所示: web: ./activator "-Dh

我刚刚用Play 2.3.8将旧的Play 2.1应用程序更新为新的Typesafe Activator。我注意到该应用程序现在似乎在项目的根目录中有一个activator启动器。我正在尝试在Heroku上部署应用程序,并出现以下错误:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
我的proc文件如下所示:

web: ./activator "-Dhttp.port=${PORT} ${JAVA_OPTS} -Dconfig.file=${CONFIG_RESOURCE}" run
这个应用程序非常小,我几乎可以肯定,启动和绑定到端口需要60秒以上的时间。在本地,它会立即使用完全相同的命令绑定

有什么想法会导致这个问题吗?

我建议不要使用
activator
在生产环境中运行你的应用程序

Heroku对您的应用程序运行
sbt stage
命令,该命令创建一个
target/universal/stage/bin/
脚本,可用于启动您的应用程序。这是一种更好的在生产中运行的方法,因为它消除了activator和/或sbt的任何开销或潜在问题

您的
Procfile
可能如下所示:

web: target/universal/stage/bin/<app-name> -Dhttp.port=${PORT} -Dconfig.file=${CONFIG_RESOURCE}
web:target/universal/stage/bin/-Dhttp.port=${port}-Dconfig.file=${CONFIG\u RESOURCE}
当然,在
build.sbt
中用应用程序的名称替换
JAVA\u选项将自动拾取

我建议不要使用
activator
在生产环境中运行您的应用程序

Heroku对您的应用程序运行
sbt stage
命令,该命令创建一个
target/universal/stage/bin/
脚本,可用于启动您的应用程序。这是一种更好的在生产中运行的方法,因为它消除了activator和/或sbt的任何开销或潜在问题

您的
Procfile
可能如下所示:

web: target/universal/stage/bin/<app-name> -Dhttp.port=${PORT} -Dconfig.file=${CONFIG_RESOURCE}
web:target/universal/stage/bin/-Dhttp.port=${port}-Dconfig.file=${CONFIG\u RESOURCE}
当然,在
build.sbt
中用应用程序的名称替换
JAVA\u选项将自动拾取

我建议不要使用
activator
在生产环境中运行您的应用程序

Heroku对您的应用程序运行
sbt stage
命令,该命令创建一个
target/universal/stage/bin/
脚本,可用于启动您的应用程序。这是一种更好的在生产中运行的方法,因为它消除了activator和/或sbt的任何开销或潜在问题

您的
Procfile
可能如下所示:

web: target/universal/stage/bin/<app-name> -Dhttp.port=${PORT} -Dconfig.file=${CONFIG_RESOURCE}
web:target/universal/stage/bin/-Dhttp.port=${port}-Dconfig.file=${CONFIG\u RESOURCE}
当然,在
build.sbt
中用应用程序的名称替换
JAVA\u选项将自动拾取

我建议不要使用
activator
在生产环境中运行您的应用程序

Heroku对您的应用程序运行
sbt stage
命令,该命令创建一个
target/universal/stage/bin/
脚本,可用于启动您的应用程序。这是一种更好的在生产中运行的方法,因为它消除了activator和/或sbt的任何开销或潜在问题

您的
Procfile
可能如下所示:

web: target/universal/stage/bin/<app-name> -Dhttp.port=${PORT} -Dconfig.file=${CONFIG_RESOURCE}
web:target/universal/stage/bin/-Dhttp.port=${port}-Dconfig.file=${CONFIG\u RESOURCE}

当然,在
build.sbt
中用应用程序的名称替换
JAVA\u选项将自动拾取

谢谢!似乎Play框架的整个结构每隔几个月就会改变一次,在本地运行时,我没有像以前那样在target/中看到二进制文件。不知道Heroku运行sbt阶段命令:)谢谢!似乎Play框架的整个结构每隔几个月就会改变一次,在本地运行时,我没有像以前那样在target/中看到二进制文件。不知道Heroku运行sbt阶段命令:)谢谢!似乎Play框架的整个结构每隔几个月就会改变一次,在本地运行时,我没有像以前那样在target/中看到二进制文件。不知道Heroku运行sbt阶段命令:)谢谢!似乎Play框架的整个结构每隔几个月就会改变一次,在本地运行时,我没有像以前那样在target/中看到二进制文件。不知道Heroku运行sbt stage命令:)