Heroku部署错误H10(应用程序崩溃) [英] Heroku deployment error H10 (App crashed)

查看:308
本文介绍了Heroku部署错误H10(应用程序崩溃)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台RoR应用程序在我的本地电脑上工作,但是当我发送到heroku时,它会崩溃。错误日志给出错误H10&说:

  2012-11-21T15:26:47 + 00:00 app [web.1]:from / app / vendor / bundle / ruby​​ / 1.9.1 / gems / newrelic_rpm-3.4.2 / lib / new_relic / control / instance_methods.rb:95:在`start_agent'
2012-11-21T15:26:48 + 00: 00 heroku [web.1]:状态从开始到崩溃
2012-11-21T15:26:48 + 00:00 heroku [web.1]:进程退出状态1
2012-11 -21T15:26:59 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:27:00 + 00:00 heroku [路由器]:at =错误代码= H10 desc =应用崩溃方法= GET路径= / favicon.ico host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:30:08 + 00:00 heroku [router]:at =错误代码= H10 desc =App crashedmethod = GET path = / host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:30: 08 + 00:00 heroku [路由器]:at =错误代码= H10 desc =App crashedmethod = GET path = / favicon.ico host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11 -21T15:30:59 + 00:00 heroku [路由器]:at =错误代码= H10 desc =App crashedmethod = GET path = / favicon.ico host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:31:19 + 00:00 heroku [路由器]:at =错误代码= H10 desc =App crashedmethod = GET path = host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:31:19 + 00:00 heroku [路由器]:at =错误代码= H10 desc =App crashedmethod = GET path = / favicon.ico host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15 :32:08 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / favicon.ico host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
2012-11-21T15:32:08 + 00:00 heroku [路由器]:at =错误代码= H10 desc =App crashedmethod = GET path = / host = xxx.herokuapp.com fwd = dyno = queue = wait = connect = service = status = 503 bytes =
pre>

编辑:

  2012-11-22T10:00: 58 + 00:00 app [web.1]:
2012-11-22T10:00:59 + 00:00 heroku [router]:at = info method = GET path = / favicon.ico host = xxx。 herokuapp.com fwd = dyno = web.1 queue = 0 wait = 0ms connect = 1ms service = 26ms status = 200 bytes = 0

有没有人曾经这样做过,知道可能会导致问题?我找不到解决方案。



谢谢。

解决方案

我遇到的问题是由于没有数据库。要解决这个问题,我先导出我的本地数据库:

  $ heroku addons:add heroku-postgresql:dev 
$ heroku addons:add pgbackups
$ PGPASSWORD = mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb> mydb.dump

然后将其导入Heroku:



$ $ $ $ $ $ $ hero ku ku s s $ $ $ $ $ $ $ $ $ $'''''''''''''''

这些示例中要替换的变量是: mypassword myuser mydb & 的http://site.tld/mydb.dump 。请注意,我必须将转储上传到临时服务器。



解决所有问题我写了一个关于如何将Enki部署到Heroku的快速指南,可以在这里找到


I have a RoR app working on my local computer, but when I send it to heroku, it crashes. The error log gives an error H10 & says:

    2012-11-21T15:26:47+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.4.2/lib/new_relic/control/instance_methods.rb:95:in `start_agent'
    2012-11-21T15:26:48+00:00 heroku[web.1]: State changed from starting to crashed
    2012-11-21T15:26:48+00:00 heroku[web.1]: Process exited with status 1
    2012-11-21T15:26:59+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:27:00+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:30:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:30:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:30:59+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:31:19+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:31:19+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:32:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
    2012-11-21T15:32:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=

Edit:

2012-11-22T10:00:58+00:00 app[web.1]: 
2012-11-22T10:00:59+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=1ms service=26ms status=200 bytes=0

Has anyone had this before, and know what might be causing the problem? I cannot find a solution.

Thanks.

解决方案

The root of the problem I was facing was due to not having a database. To resolve the problem I first exported my local database:

$ heroku addons:add heroku-postgresql:dev 
$ heroku addons:add pgbackups
$ PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump 

Then imported it into Heroku:

$ heroku pgbackups:restore DATABASE 'http://site.tld/mydb.dump'

The variables to replace in these examples are: mypassword, myuser, mydb & http://site.tld/mydb.dump. Note that I had to upload the dump to a temporary server.

Resolving all my problems I wrote up a quick guide on how to deploy Enki to Heroku, which can be found here.

这篇关于Heroku部署错误H10(应用程序崩溃)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆