简体   繁体   English

heroku[router]: at=error code=H10 desc="App crashed" 方法

[英]heroku[router]: at=error code=H10 desc="App crashed" method

on Ruby on Rails - Heroku deployment , I got a error of heroku[route]: at=error code=H10 desc="App crashed" method After some debugging the log texts, main part of the log file I got:Ruby on Rails - Heroku 部署上,我得到了heroku[route]: at=error code=H10 desc="App crashed" method的错误经过一些调试日志文本后,我得到了日志文件的主要部分:

2022-01-08T11:12:12.754916+00:00 heroku[web.1]: Starting process with command `bin/rails server -p ${PORT:-5000} -e production`
2022-01-08T11:12:16.534794+00:00 app[web.1]: => Booting Puma
2022-01-08T11:12:16.534809+00:00 app[web.1]: => Rails 6.1.4.4 application starting in production 
2022-01-08T11:12:16.534810+00:00 app[web.1]: => Run `bin/rails server --help` for more startup options
2022-01-08T11:12:17.742438+00:00 app[web.1]: Exiting
2022-01-08T11:12:17.745593+00:00 app[web.1]: /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require': cannot load such file -- net/pop (LoadError)
2022-01-08T11:12:17.745616+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.745630+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:36:in `<class:POP3>'
2022-01-08T11:12:17.745642+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:35:in `<module:Mail>'
2022-01-08T11:12:17.745655+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/network/retriever_methods/pop3.rb:4:in `<main>'
2022-01-08T11:12:17.745668+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.745681+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.745694+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.745708+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.745720+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.745733+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.745745+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `block in eager_autoload!'
2022-01-08T11:12:17.745761+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `each'
2022-01-08T11:12:17.745774+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail.rb:54:in `eager_autoload!'
2022-01-08T11:12:17.745786+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/actionmailer-6.1.4.4/lib/action_mailer.rb:61:in `eager_load!'
2022-01-08T11:12:17.745799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application/finisher.rb:134:in `each'
2022-01-08T11:12:17.745811+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application/finisher.rb:134:in `block in <module:Finisher>'
2022-01-08T11:12:17.745824+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `instance_exec'
2022-01-08T11:12:17.745838+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:32:in `run'
2022-01-08T11:12:17.745850+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:61:in `block in run_initializers'
2022-01-08T11:12:17.745863+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
2022-01-08T11:12:17.745875+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2022-01-08T11:12:17.745888+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
2022-01-08T11:12:17.745900+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
2022-01-08T11:12:17.745913+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `each'
2022-01-08T11:12:17.745926+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `call'
2022-01-08T11:12:17.745938+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
2022-01-08T11:12:17.745950+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
2022-01-08T11:12:17.745963+00:00 app[web.1]:    from /app/vendor/ruby-3.1.0/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
2022-01-08T11:12:17.745975+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/initializable.rb:60:in `run_initializers'
2022-01-08T11:12:17.745988+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/application.rb:391:in `initialize!'
2022-01-08T11:12:17.746002+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<main>'
2022-01-08T11:12:17.746015+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.746027+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.746040+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.746053+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.746066+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.746079+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/zeitwerk-2.5.3/lib/zeitwerk/kernel.rb:35:in `require'
2022-01-08T11:12:17.746092+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `block in require'
2022-01-08T11:12:17.746104+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:299:in `load_dependency'
2022-01-08T11:12:17.746117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/activesupport-6.1.4.4/lib/active_support/dependencies.rb:332:in `require'
2022-01-08T11:12:17.746130+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative'
2022-01-08T11:12:17.746143+00:00 app[web.1]:    from config.ru:3:in `block in <main>'
2022-01-08T11:12:17.746156+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
2022-01-08T11:12:17.746169+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
2022-01-08T11:12:17.746181+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
2022-01-08T11:12:17.746194+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
2022-01-08T11:12:17.746206+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2022-01-08T11:12:17.746219+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
2022-01-08T11:12:17.746232+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
2022-01-08T11:12:17.746245+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
2022-01-08T11:12:17.746258+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
2022-01-08T11:12:17.746270+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
2022-01-08T11:12:17.746283+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:39:in `start'
2022-01-08T11:12:17.746297+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:144:in `block in perform'
2022-01-08T11:12:17.746309+00:00 app[web.1]:    from <internal:kernel>:90:in `tap'
2022-01-08T11:12:17.746322+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands/server/server_command.rb:135:in `perform'
2022-01-08T11:12:17.746335+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
2022-01-08T11:12:17.746348+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
2022-01-08T11:12:17.746361+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
2022-01-08T11:12:17.746373+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/command/base.rb:69:in `perform'
2022-01-08T11:12:17.746386+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/command.rb:48:in `invoke'
2022-01-08T11:12:17.746399+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/railties-6.1.4.4/lib/rails/commands.rb:18:in `<main>'
2022-01-08T11:12:17.746412+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
2022-01-08T11:12:17.746424+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
2022-01-08T11:12:17.746437+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in `register'
2022-01-08T11:12:17.746451+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
2022-01-08T11:12:17.746463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
2022-01-08T11:12:17.746476+00:00 app[web.1]:    from bin/rails:5:in `<main>'
2022-01-08T11:12:17.961296+00:00 heroku[web.1]: Process exited with status 1
2022-01-08T11:12:18.044550+00:00 heroku[web.1]: State changed from starting to crashed

Though this was the main topic of the full log text on production environment, but in local development environment, there was no issues found while starting the Rails server.虽然这是生产环境日志全文的主题,但是在本地开发环境中,启动 Rails 服务器时没有发现问题。 Everything was working fine on development environment.在开发环境中一切正常。

Besides, the URL was showing the following texts:此外,URL 显示以下文本:

Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail

And the console is showing this: Failed to load resource: the server responded with a status of 503 (Service Unavailable)

Solution解决方案

Ok, after a few deployments of fixing the errors found from the log file, I got that, in our Gemfile , we need to add some gem (around 3 gems) which are needed for some dependencies.好的,在修复了从日志文件中发现的错误的几次部署之后,我知道,在我们的Gemfile中,我们需要添加一些依赖项所需的gem (大约 3 个 gem)。 Those gems are:这些宝石是:

# Gemfile

gem 'net-smtp', require: false
gem 'net-pop', require: false
gem 'net-imap', require: false

after adding those to our gem file, run将它们添加到我们的 gem 文件后,运行

bundle install

Then deploy the code on heroku and this will make a proper deployment.然后在 heroku 上部署代码,这将进行正确的部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃” - heroku[router]: at=error code=H10 desc=“App crashed” 铁路应用:heroku [路由器]:at =错误代码= H10 desc =“应用已崩溃” - RAILS APP : heroku[router]: at=error code=H10 desc=“App crashed” Heroku“at = error code = H10 desc =”App崩溃“method = GET path = / favicon.ico” - Heroku “at=error code=H10 desc=”App crashed“ method=GET path=/favicon.ico” Rails应用程序上的Heroku错误:错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /favicon.ico”主机= - Heroku error on Rails app : error code=H10 desc=“App crashed” method=GET path=“/favicon.ico” host= Heroku Rails部署“ at =错误代码= H10 desc =”应用程序崩溃” - Heroku rails deployment “at=error code=H10 desc=”App crashed" Heroku代码= H10应用程序崩溃 - Heroku code=H10 app crashed Heroku错误H10-(应用程序崩溃) - Heroku error H10 - (App crashed) Heroku - 错误H10(App崩溃) - Heroku - Error H10 (App crashed) Heroku H10错误“App Crashed” - Heroku H10 error “App Crashed” Ruby on Rails App 正在开发中,构建成功然后在 Heroku 上崩溃 at=error code=H10 desc="App crashed" - Ruby on Rails App works in development, build succeeds then crashes on Heroku at=error code=H10 desc="App crashed"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM