在Heroku上部署夹层

时间:2014-04-24 13:50:26

标签: django heroku mezzanine

我一直在按照this article的说明在heroku上部署夹层 我想从heroku运行静态文件,所以按照上面提到的链接中的说明进行操作,但是当我这样做时,我发现了这个错误" Heroku打开"

Opening mezzanine-be... failed
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       Unable to find a browser command. If this is unexpected, Please rerun with environment variab
le LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/laun
chy/issues/new (Launchy::CommandNotFoundError)
    Backtrace:   /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:63:in `browse
r_cmdline'
                 /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:67:in `cmd_an
d_args'
                 /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:78:in `open'
                 /usr/local/heroku/vendor/gems/launchy-2.4.2/lib/launchy.rb:29:in `open'
                 /usr/local/heroku/lib/heroku/helpers.rb:328:in `block in launchy'
                 /usr/local/heroku/lib/heroku/helpers.rb:227:in `action'
                 /usr/local/heroku/lib/heroku/helpers.rb:326:in `launchy'
                 /usr/local/heroku/lib/heroku/command/apps.rb:338:in `open'
                 /usr/local/heroku/lib/heroku/command.rb:218:in `run'
                 /usr/local/heroku/lib/heroku/cli.rb:28:in `start'
                 /usr/local/heroku/bin/heroku:25:in `<main>'

    Command:     heroku open
    Version:     heroku-toolbelt/3.4.1 (i686-linux) ruby/1.9.3

我做了这个日志&#34; heroku日志&#34;

2014-04-22T22:14:23.416063+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-22T22:14:23.472992+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-22T22:14:23.416081+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-22T22:14:23.472983+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-22T22:14:25.275890+00:00 heroku[web.1]: Process exited with status 1
2014-04-22T22:14:25.282406+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-23T04:09:18.972452+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-23T04:09:25.363685+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:55680 -w 1`
2014-04-23T04:09:26.682220+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-23T04:09:26.682206+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-23T04:09:26.695461+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-23T04:09:26.695465+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-23T04:09:28.055144+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-23T04:09:28.049204+00:00 heroku[web.1]: Process exited with status 1
2014-04-23T09:52:14.401914+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-23T09:52:20.442477+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:30095 -w 1`
2014-04-23T09:52:22.164719+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-23T09:52:22.164739+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-23T09:52:22.179570+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-23T09:52:22.179578+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-23T09:52:23.715744+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-23T09:52:23.701333+00:00 heroku[web.1]: Process exited with status 1
2014-04-23T16:07:31.408614+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-23T16:07:38.553626+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:56763 -w 1`
2014-04-23T16:07:41.125475+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-23T16:07:41.238560+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-23T16:07:41.238566+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-23T16:07:41.125462+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-23T16:07:42.885219+00:00 heroku[web.1]: Process exited with status 1
2014-04-23T16:07:42.896873+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-23T22:09:39.404254+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-23T22:09:49.448643+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-23T22:09:49.460740+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-23T22:09:49.460747+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-23T22:09:49.448658+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-23T22:09:48.480416+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:9678 -w 1`
2014-04-23T22:09:50.717983+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-23T22:09:50.696212+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T04:11:51.194122+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-24T04:11:56.788844+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:36892 -w 1`
2014-04-24T04:11:58.067181+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-24T04:11:58.067201+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-24T04:11:58.092913+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-24T04:11:58.092919+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-24T04:11:59.280453+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T04:11:59.295201+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-24T09:58:52.585546+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-24T09:58:59.277649+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:56234 -w 1`
2014-04-24T09:59:00.934694+00:00 app[web.1]: /app/.heroku/python/lib/python2.7/site-packages/mezzanine/utils/c
onf.py:59: UserWarning: TIME_ZONE setting is not set, using closest match: Etc/UTC
2014-04-24T09:59:00.934710+00:00 app[web.1]:   warn("TIME_ZONE setting is not set, using closest match: %s" %
tz)
2014-04-24T09:59:00.951280+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-24T09:59:00.951287+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-24T09:59:02.627604+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-24T09:59:02.616971+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T13:30:08+00:00 heroku[slug-compiler]: Slug compilation started
2014-04-24T13:30:44+00:00 heroku[slug-compiler]: Slug compilation finished
2014-04-24T13:30:44.581580+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-24T13:30:44.310696+00:00 heroku[api]: Release v6 created by chetan.s.kaushal@gmail.com
2014-04-24T13:30:44.310620+00:00 heroku[api]: Deploy da509c9 by chetan.s.kaushal@gmail.com
2014-04-24T13:30:51.209645+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:28107 -w 1`
2014-04-24T13:30:52.802204+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-24T13:30:52.802220+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-24T13:30:54.569234+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-24T13:30:54.549885+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T13:30:54.569652+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-24T13:31:00.396574+00:00 heroku[web.1]: Starting process with command `python manage.py run_gunicorn -
b 0.0.0.0:50627 -w 1`
2014-04-24T13:31:03.282440+00:00 app[web.1]: Unknown command: 'run_gunicorn'
2014-04-24T13:31:03.282451+00:00 app[web.1]: Type 'manage.py help' for usage.
2014-04-24T13:31:04.743794+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T13:31:04.756855+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-24T13:31:06.091140+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=m
ezzanine-be.herokuapp.com request_id=c1d2e607-a55c-422c-9ef1-f6a45ace8f82 fwd="1.23.88.93" dyno= connect= serv
ice= status=503 bytes=
2014-04-24T13:31:06.829718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon
.ico host=mezzanine-be.herokuapp.com request_id=df6accba-7950-4bec-ae57-116ec3cfe5f6 fwd="1.23.88.93" dyno= co
nnect= service= status=503 bytes=
2014-04-24T13:35:10+00:00 heroku[slug-compiler]: Slug compilation started
2014-04-24T13:35:56+00:00 heroku[slug-compiler]: Slug compilation finished
2014-04-24T13:35:56.126982+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-24T13:35:56.003342+00:00 heroku[api]: Release v7 created by chetan.s.kaushal@gmail.com
2014-04-24T13:35:56.003219+00:00 heroku[api]: Deploy 8cdb5a0 by chetan.s.kaushal@gmail.com
2014-04-24T13:36:03.608314+00:00 app[web.1]: ImproperlyConfigured: The SECRET_KEY setting must not be empty.
2014-04-24T13:36:04.981170+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-24T13:36:02.181124+00:00 heroku[web.1]: Starting process with command `python manage.py runserver 0.0.
0.0:59156 --noreload`
2014-04-24T13:36:04.967644+00:00 heroku[web.1]: Process exited with status 1
2014-04-24T13:36:49.185541+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=m
ezzanine-be.herokuapp.com request_id=403daa9a-5359-4041-b0a0-a7ecaaf2a839 fwd="1.23.88.93" dyno= connect= serv
ice= status=503 bytes=
2014-04-24T13:36:49.802726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon
.ico host=mezzanine-be.herokuapp.com request_id=d0a5e62e-29e4-444d-87f4-0a83f635a53c fwd="1.23.88.93" dyno= co
nnect= service= status=503 bytes=
2014-04-24T13:38:54.744538+00:00 heroku[api]: Starting process with command `python manage.py createdb` by che
tan.s.kaushal@gmail.com
2014-04-24T13:39:02.543383+00:00 heroku[run.4712]: State changed from starting to up
2014-04-24T13:39:02.443450+00:00 heroku[run.4712]: Awaiting client
2014-04-24T13:39:02.480032+00:00 heroku[run.4712]: Starting process with command `python manage.py createdb`
2014-04-24T13:39:04.781382+00:00 heroku[run.4712]: Process exited with status 1
2014-04-24T13:39:04.792816+00:00 heroku[run.4712]: State changed from up to complete
2014-04-24T13:39:35.844877+00:00 heroku[api]: Starting process with command `python manage.py createdb --noinp
ut` by chetan.s.kaushal@gmail.com
2014-04-24T13:39:43.296642+00:00 heroku[run.2213]: Awaiting client
2014-04-24T13:39:43.363388+00:00 heroku[run.2213]: Starting process with command `python manage.py createdb --
noinput`
2014-04-24T13:39:43.338269+00:00 heroku[run.2213]: State changed from starting to up
2014-04-24T13:39:45.504923+00:00 heroku[run.2213]: Process exited with status 1
2014-04-24T13:39:45.513948+00:00 heroku[run.2213]: State changed from up to complete
2014-04-24T13:40:07.033895+00:00 heroku[api]: Starting process with command `python manage.py createdb` by che
tan.s.kaushal@gmail.com
2014-04-24T13:40:14.314579+00:00 heroku[run.5886]: Awaiting client
2014-04-24T13:40:14.359512+00:00 heroku[run.5886]: Starting process with command `python manage.py createdb`
2014-04-24T13:40:14.154217+00:00 heroku[run.5886]: State changed from starting to up
2014-04-24T13:40:16.102836+00:00 heroku[run.5886]: State changed from up to complete
2014-04-24T13:40:16.092128+00:00 heroku[run.5886]: Process exited with status 1

2 个答案:

答案 0 :(得分:0)

这里有三个独立且未实现的问题:

  1. 由于某些原因无法找到浏览器,因此无法运行heroku open。无论哪种方式,它只是一个快捷方式,您可以直接在浏览器中打开您的heroku应用程序。
  2. 你的应用程序没有在Django gunicorn中安装INSTALLED_APPS,添加它并重试。 (这也在您提到的链接中明确提到。)
  3. 您的应用程序缺少必需的SECRET_KEY

答案 1 :(得分:0)

您的requirements.txt也必须有一条枪支线。

pip install gunicorn
pip freeze > requirements.txt
git add requirements.txt
git commit -m "updated requirements"
git push heroku master

再试一次:

heroku open

我猜你也错过了requirements.txt中的其他项目,因为你遇到了这个错误,但这有助于你克服没有被发现的枪支。