我怎样才能解读这条Heroku错误信息?

时间:2013-07-09 18:19:43

标签: debugging heroku

我对Heroku来说是全新的,所以这可能是一个新手问题。我刚刚尝试推送我的应用程序,并收到以下消息:

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 [api]”变为“heroku [web.1]”时。但我不能肯定地说。我希望能够自己解读Heroku消息,我只需要知道在哪里查看或如何开始调试。

谢谢大家!

rickthomas$ heroku logs
2013-07-09T17:33:06.459433+00:00 heroku[api]: Enable Logplex by email@gmail.com
2013-07-09T17:33:06.496133+00:00 heroku[api]: Release v2 created by email@gmail.com
2013-07-09T17:33:21+00:00 heroku[slug-compiler]: Slug compilation started
2013-07-09T17:35:17.225189+00:00 heroku[api]: Scale to web=1 by email@gmail.com
2013-07-09T17:35:17.676874+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_IVORY resource by email@gmail.com
2013-07-09T17:35:17.708587+00:00 heroku[api]: Release v3 created by email@gmail.com
2013-07-09T17:35:17.786263+00:00 heroku[api]: Add DATABASE_URL config by email@gmail.com
2013-07-09T17:35:17.801350+00:00 heroku[api]: Release v4 created by email@gmail.com
2013-07-09T17:35:17.846508+00:00 heroku[api]: Deploy ca4cf14 by email@gmail.com
2013-07-09T17:35:17.861693+00:00 heroku[api]: Release v5 created by email@gmail.com
2013-07-09T17:35:17.901985+00:00 heroku[api]: Deploy ca4cf14 by email@gmail.com
2013-07-09T17:35:18+00:00 heroku[slug-compiler]: Slug compilation finished
2013-07-09T17:35:20.490635+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 15074`
2013-07-09T17:35:21.528470+00:00 app[web.1]: The source :rubygems is deprecated because HTTP requests are insecure.
2013-07-09T17:35:21.528470+00:00 app[web.1]: Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/config/environment.rb:21:in `<top (required)>'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/config.ru:2:in `require'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/config.ru:2:in `block in <main>'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-07-09T17:35:22.120319+00:00 app[web.1]: /app/config/environment.rb:21:in `require': cannot load such file -- faker (LoadError)
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-07-09T17:35:22.120508+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-07-09T17:35:22.120319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-07-09T17:35:23.396333+00:00 heroku[web.1]: Process exited with status 1
2013-07-09T17:35:23.410600+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-09T17:35:23.411208+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-09T17:35:26.683935+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 57539`
2013-07-09T17:35:27.666245+00:00 app[web.1]: The source :rubygems is deprecated because HTTP requests are insecure.
2013-07-09T17:35:27.666245+00:00 app[web.1]: Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/config.ru:in `new'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2013-07-09T17:35:28.270486+00:00 app[web.1]: /app/config/environment.rb:21:in `require': cannot load such file -- faker (LoadError)
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/config.ru:2:in `block in <main>'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/config/environment.rb:21:in `<top (required)>'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/config.ru:2:in `require'
2013-07-09T17:35:28.270486+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2013-07-09T17:35:28.270736+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2013-07-09T17:35:29.714787+00:00 heroku[web.1]: Process exited with status 1
2013-07-09T17:35:29.731620+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-09T17:37:15.135194+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:37:15.526745+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:37:18.534815+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:37:20.075790+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:37:44.605357+00:00 heroku[api]: Scale to web=1 by email@gmail.com
2013-07-09T17:37:49.741821+00:00 heroku[api]: Scale to web=1 by email@gmail.com
2013-07-09T17:37:18.353741+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:39:03.510163+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:39:09.125379+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
2013-07-09T17:39:09.188174+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=boiling-scrubland-3057.herokuapp.com fwd="74.122.9.196" dyno= connect= service= status=503 bytes=
Ricks-MacBook-Pro:even_awesomer_blog_soon_to_be_hacker_news rickthomas$ 

2 个答案:

答案 0 :(得分:0)

深入潜入日志之后,我最接近的错误信息是:

2013-07-09T17:35:22.120319+00:00 app[web.1]: /app/config/environment.rb:21:in `require': cannot load such file -- faker (LoadError)

我只是在gemfile和environment.rb文件中注释掉了对“Faker”gem的引用,并将其重新部署到Heroku。这很好。

经验教训 - Heroku和Faker不能很好地融合在一起。

答案 1 :(得分:0)

也可以试试Gemfile

gem 'faker', require: false

然后在必要时特别要求它。