将play 2.1.1框架部署到heroku

将play 2.1.1框架部署到heroku,heroku,playframework-2.1,Heroku,Playframework 2.1,我试图将我的应用程序部署到heroku,但我遇到了一个错误 我创建了一个procfile并把这行 web: target/start --http.port=$PORT $PLAY_OPTS 我可以推送应用程序,但当我执行此命令时,我收到此错误 === web (1X): `play run --http.port=$PORT $PLAY_OPTS` web.1: crashed 2013/06/15 22:17:41 (~ 2m ago) 在heroku open上,我收到

我试图将我的应用程序部署到heroku,但我遇到了一个错误

我创建了一个procfile并把这行

        web: target/start --http.port=$PORT $PLAY_OPTS
我可以推送应用程序,但当我执行此命令时,我收到此错误

=== web (1X): `play run --http.port=$PORT $PLAY_OPTS`
web.1: crashed 2013/06/15 22:17:41 (~ 2m ago)
在heroku open上,我收到一个应用程序错误

我做错了什么

更新: 我编辑到procfile,现在在日志中我得到了这个错误
无法识别的选项:--http.port=6192

2013-06-16T19:03:15.019987+00:00 heroku[slugc]: Slug compilation started
2013-06-16T19:05:18.689752+00:00 heroku[api]: Release v12 created by     miko5054@gmail.com
2013-06-16T19:05:18.658969+00:00 heroku[api]: Deploy df1da57 by miko5054@gmail.com
2013-06-16T19:05:18.741269+00:00 heroku[api]: Deploy df1da57 by miko5054@gmail.com
2013-06-16T19:05:19.331223+00:00 heroku[web.1]: State changed from crashed to starting
2013-06-16T19:05:20.703658+00:00 heroku[slugc]: Slug compilation finished
2013-06-16T19:05:27.374326+00:00 heroku[web.1]: Starting process with command    `target/start --http.port=6192 $PLAY_OPTS`
2013-06-16T19:05:28.121197+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS:  -     Djava.rmi.server.useCodebaseOnly=true
2013-06-16T19:05:28.121197+00:00 app[web.1]: Unrecognized option: --http.port=6192
2013-06-16T19:05:28.121197+00:00 app[web.1]: Could not create the Java virtual machine.
2013-06-16T19:05:29.501307+00:00 heroku[web.1]: Process exited with status 1
2013-06-16T19:05:29.505969+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-16T19:05:37.540727+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-06-16T19:05:37.540529+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed    to launch the dyno within 10 seconds
更新2

2013-06-16T19:03:15.019987+00:00 heroku[slugc]: Slug compilation started
2013-06-16T19:05:18.689752+00:00 heroku[api]: Release v12 created by     miko5054@gmail.com
2013-06-16T19:05:18.658969+00:00 heroku[api]: Deploy df1da57 by miko5054@gmail.com
2013-06-16T19:05:18.741269+00:00 heroku[api]: Deploy df1da57 by miko5054@gmail.com
2013-06-16T19:05:19.331223+00:00 heroku[web.1]: State changed from crashed to starting
2013-06-16T19:05:20.703658+00:00 heroku[slugc]: Slug compilation finished
2013-06-16T19:05:27.374326+00:00 heroku[web.1]: Starting process with command    `target/start --http.port=6192 $PLAY_OPTS`
2013-06-16T19:05:28.121197+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS:  -     Djava.rmi.server.useCodebaseOnly=true
2013-06-16T19:05:28.121197+00:00 app[web.1]: Unrecognized option: --http.port=6192
2013-06-16T19:05:28.121197+00:00 app[web.1]: Could not create the Java virtual machine.
2013-06-16T19:05:29.501307+00:00 heroku[web.1]: Process exited with status 1
2013-06-16T19:05:29.505969+00:00 heroku[web.1]: State changed from starting to crashed
2013-06-16T19:05:37.540727+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-06-16T19:05:37.540529+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed    to launch the dyno within 10 seconds
我试着给尼科·埃基托提建议,但是 当我完全删除
Procfile
时,这就是我得到的

  2013-06-17T15:46:00.964382+00:00 heroku[web.1]: Starting process with command      `target/start -Dhttp.port=27372 -Xmx384m -Xss512k -XX:+UseCompressedOops`
  2013-06-17T15:46:03.034355+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS:  -     Djava.rmi.server.useCodebaseOnly=true
  2013-06-17T15:46:05.654657+00:00 app[web.1]: Play server process ID is 2
  2013-06-17T15:46:08.146849+00:00 app[web.1]: [error] c.j.b.h.AbstractConnectionHook -         Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0.         Exception: java.net.ConnectException: Connection refused
当这个
procfileweb:target/start-Dhttp.port=${port}

我得到了这个结果

     2013-06-17T15:53:55.937519+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=${PORT}`
     2013-06-17T15:53:56.825154+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS:  -Djava.rmi.server.useCodebaseOnly=true
      2013-06-17T15:54:02.003067+00:00 app[web.1]: Play server process ID is 2
      2013-06-17T15:54:07.088725+00:00 app[web.1]: [error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping for 0ms and trying again. Attempts left: 0. Exception: java.net.ConnectException: Connection refused
更新3

我几乎放弃了

但我通过使用 这个程序文件

web: target/start -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -  Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}
现在我得到了这个奇怪的错误

 Caused by: org.postgresql.util.PSQLException: FATAL: role "jmcgekjnrcomcr" is not   permitted to log in
这是我在配置文件中的postgres配置

   #postgres
   db.default.driver=org.postgresql.Driver
   #db.default.url="jdbc:postgresql://localhost:5432/data"
   #db.default.user=***
    #db.default.password=***

感谢最新Heroku buildpack中的帮助,
Procfile
是可选的

如果要使用
程序文件
,则必须从中使用:

web: target/start -Dhttp.port=${PORT}

请尝试使用heroku日志检查您的应用程序日志。@nico_ekito我添加了日志您在使用数据库吗?如果是这样,它将无法连接到它,您必须将Heroku配置为连接到您的db url。