heroku open
**Application Error**
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
heroku ps:scale web = 1
Scaling dynos... !
! Couldn't find that formation.
heroku ps
=== java (Free): -cp target/classes:"target/dependency/*" Main (1)
java.1: crashed 2016/07/06 10:54:23 -0400 (~ 10m ago)
资料
java -cp target/classes:"target/dependency/*" Main
日志
2016-07-06T14:52:50.963871+00:00 heroku[slug-compiler]: Slug compilation finished
2016-07-06T14:52:50.963854+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-06T14:52:50.683308+00:00 heroku[api]: Deploy 35c084d by x
2016-07-06T14:52:50.683375+00:00 heroku[api]: Release v10 created by x
2016-07-06T14:54:14.470081+00:00 heroku[java.1]: Starting process with command `-cp target/classes:"target/dependency/*" Main`
2016-07-06T14:54:15.170320+00:00 heroku[java.1]: State changed from starting to up
2016-07-06T14:54:16.654892+00:00 app[java.1]: --debug
2016-07-06T14:54:16.654887+00:00 app[java.1]: bash [GNU long option] [option] script-file ...
2016-07-06T14:54:16.654886+00:00 app[java.1]: Usage: bash [GNU long option] [option] ...
2016-07-06T14:54:16.654891+00:00 app[java.1]: GNU long options:
2016-07-06T14:54:16.654843+00:00 app[java.1]: bash: - : invalid option
2016-07-06T14:54:16.654896+00:00 app[java.1]: --noediting
2016-07-06T14:54:16.654896+00:00 app[java.1]: --login
2016-07-06T14:54:16.654895+00:00 app[java.1]: --help
2016-07-06T14:54:16.654894+00:00 app[java.1]: --dump-po-strings
2016-07-06T14:54:16.654895+00:00 app[java.1]: --init-file
2016-07-06T14:54:16.654897+00:00 app[java.1]: --noprofile
2016-07-06T14:54:16.654898+00:00 app[java.1]: --rcfile
2016-07-06T14:54:16.654894+00:00 app[java.1]: --dump-strings
2016-07-06T14:54:16.654893+00:00 app[java.1]: --debugger
2016-07-06T14:54:16.654898+00:00 app[java.1]: --posix
2016-07-06T14:54:16.654901+00:00 app[java.1]: -ilrsD or -c command or -O shopt_option (invocation only)
2016-07-06T14:54:16.654897+00:00 app[java.1]: --norc
2016-07-06T14:54:16.654899+00:00 app[java.1]: --verbose
2016-07-06T14:54:16.654899+00:00 app[java.1]: --restricted
2016-07-06T14:54:16.654900+00:00 app[java.1]: Shell options:
2016-07-06T14:54:16.657140+00:00 app[java.1]: -abefhkmnptuvxBCHP or -o option
2016-07-06T14:54:16.654900+00:00 app[java.1]: --version
2016-07-06T14:54:17.528290+00:00 heroku[java.1]: Process exited with status 2
2016-07-06T14:54:17.542231+00:00 heroku[java.1]: State changed from up to crashed
2016-07-06T14:54:17.543267+00:00 heroku[java.1]: State changed from crashed to starting
2016-07-06T14:54:11.196338+00:00 heroku[api]: Scale to java=1 by x
2016-07-06T14:54:20.300261+00:00 heroku[java.1]: Starting process with command `-cp target/classes:"target/dependency/*" Main`
2016-07-06T14:54:20.865468+00:00 heroku[java.1]: State changed from starting to up
2016-07-06T14:54:22.202618+00:00 app[java.1]: Usage: bash [GNU long option] [option] ...
2016-07-06T14:54:22.202718+00:00 app[java.1]: --debug
2016-07-06T14:54:22.202569+00:00 app[java.1]: bash: - : invalid option
2016-07-06T14:54:22.202696+00:00 app[java.1]: GNU long options:
2016-07-06T14:54:22.202756+00:00 app[java.1]: --dump-strings
2016-07-06T14:54:22.202745+00:00 app[java.1]: --dump-po-strings
2016-07-06T14:54:22.202801+00:00 app[java.1]: --noediting
2016-07-06T14:54:22.202817+00:00 app[java.1]: --noprofile
2016-07-06T14:54:22.202673+00:00 app[java.1]: bash [GNU long option] [option] script-file ...
2016-07-06T14:54:22.202851+00:00 app[java.1]: --posix
2016-07-06T14:54:22.202871+00:00 app[java.1]: --rcfile
2016-07-06T14:54:22.202882+00:00 app[java.1]: --restricted
2016-07-06T14:54:22.202929+00:00 app[java.1]: -ilrsD or -c command or -O shopt_option (invocation only)
2016-07-06T14:54:22.202904+00:00 app[java.1]: --version
2016-07-06T14:54:22.202894+00:00 app[java.1]: --verbose
2016-07-06T14:54:22.202767+00:00 app[java.1]: --help
2016-07-06T14:54:22.207694+00:00 app[java.1]: -abefhkmnptuvxBCHP or -o option
2016-07-06T14:54:22.202733+00:00 app[java.1]: --debugger
2016-07-06T14:54:22.202917+00:00 app[java.1]: Shell options:
2016-07-06T14:54:22.202779+00:00 app[java.1]: --init-file
2016-07-06T14:54:22.202790+00:00 app[java.1]: --login
2016-07-06T14:54:22.202830+00:00 app[java.1]: --norc
2016-07-06T14:54:23.144909+00:00 heroku[java.1]: State changed from up to crashed
2016-07-06T14:55:25.085848+00:00 heroku[run.1884]: Awaiting client
2016-07-06T14:55:25.116164+00:00 heroku[run.1884]: Starting process with command `bash`
2016-07-06T14:55:25.238162+00:00 heroku[run.1884]: State changed from starting to up
2016-07-06T14:55:21.592683+00:00 heroku[api]: Starting process with command `bash` by x
2016-07-06T14:55:30.714524+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=protected-springs-72126.herokuapp.com request_id=7b695be3-670d-48d0-9745-6f7da1f881ad fwd="134.174.21.28" dyno= connect= service= status=503 bytes=
2016-07-06T14:55:38.428997+00:00 heroku[run.1884]: Process exited with status 130
2016-07-06T14:55:38.441761+00:00 heroku[run.1884]: State changed from up to complete
2016-07-06T14:56:25.871582+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=protected-springs-72126.herokuapp.com request_id=efc7b256-34eb-4e8e-941b-b902859469cb fwd="134.174.21.28" dyno= connect= service= status=503 bytes=
我正在跟随java教程(https://devcenter.heroku.com/articles/getting-started-with-java#introduction)开始使用heroku。当我最初尝试扩展它工作正常,但当我到“使用数据库”时,heroku打开显示一个网页,上面显示的错误和heroku ps:scale web = 1不再有效。我不知道我搞砸了什么。
答案 0 :(得分:2)
您的Procfile
缺少web:
指令。它应该是这样的:
web: java -cp target/classes:"target/dependency/*" Main