我想能够在Heroku上以测试模式启动我的游戏应用程序吗?
我添加了此Procfile:

web:    play test --http.port=$PORT $PLAY_OPTS

但是,当我启动服务器时,可以在Hereoku日志中看到它。
←[32m2012-01-15T19:11:04+00:00 heroku[web.1]:←[0m State changed from crashed to created
←[32m2012-01-15T19:11:04+00:00 heroku[web.1]:←[0m State changed from created to starting
←[32m2012-01-15T19:11:16+00:00 heroku[web.1]:←[0m Starting process with command `play test --http.port=19429 --%prod -Dprecompiled=true
`
←[32m2012-01-15T19:11:17+00:00 app[web.1]:←[0m Listening for transport dt_socket at address: 8000
←[32m2012-01-15T19:11:18+00:00 app[web.1]:←[0m 19:11:18,040 INFO  ~ Starting /app
←[32m2012-01-15T19:11:18+00:00 heroku[web.1]:←[0m Error R11 (Bad bind) -> Process bound to port 8000, should be 19429 (see environment
variable PORT)
←[32m2012-01-15T19:11:18+00:00 heroku[web.1]:←[0m Stopping process with SIGKILL
←[32m2012-01-15T19:11:18+00:00 app[web.1]:←[0m 19:11:18,048 INFO  ~ Module scala is available (/app/modules/scala-0.9.1)
←[32m2012-01-15T19:11:19+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[32m2012-01-15T19:11:19+00:00 heroku[web.1]:←[0m Process exited

我猜是因为默认情况下play使用jpda.port = 8000且Heroku使用默认参数崩溃。他们的文档完全没有评论测试模式,因此有人成功开始在Heroku上以测试模式播放吗?我想我在procfile中需要像--jpda.port=$PORT2这样的东西

最佳答案

Heroku上的应用程序只能打开一个端口($ PORT变量中提供的端口)。不幸的是,这意味着玩!测试模式无法打开远程调试所需的第二个端口。

10-06 07:15
查看更多