我试图将我的应用程序部署到heroku,但出现错误
我创建了一个procfile并把这一行
web: target/start --http.port=$PORT $PLAY_OPTS
我可以推送应用程序,但是当我执行此命令时 heroku ps我收到此错误
=== 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
我尝试向nico_etkito 提供建议,但是当我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
当这个Procfile web: 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
我几乎放弃了……
但我通过使用这个 Procfile 克服了早期的问题
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=***
谢谢您的帮助