Sidekiq没有在heroku上启动

时间:2017-08-25 09:47:51

标签: ruby-on-rails heroku sidekiq

部署后,我在Heroku上收到错误

2017-08-25T09:23:44.912360+00:00 app[worker.1]: 4 TID-ou1bsoxvs INFO: Booting Sidekiq 4.2.9 with redis options {:url=>"REDISTOGO_URL"}
2017-08-25T09:23:46.295235+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=techrise-staging.herokuapp.com request_id=5d74f259-7e4c-4e3a-893a-7a1541355aef fwd="27.34.17.28" dyno= connect= service= status=503 bytes= protocol=https
2017-08-25T09:23:46.546897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=techrise-staging.herokuapp.com request_id=49557f73-0586-4bb2-96d9-015f5dd5a232 fwd="27.34.17.28" dyno= connect= service= status=503 bytes= protocol=https
2017-08-25T09:23:46.673865+00:00 app[worker.1]: 4 TID-ou1bsoxvs DEBUG: Autoload disabled in staging, Sidekiq will not reload changed classes
2017-08-25T09:23:46.985541+00:00 app[worker.1]: 4 TID-ou1bsoxvs INFO: Running in ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
2017-08-25T09:23:46.985557+00:00 app[worker.1]: 4 TID-ou1bsoxvs INFO: See LICENSE and the LGPL-3.0 for licensing details.
2017-08-25T09:23:46.985572+00:00 app[worker.1]: 4 TID-ou1bsoxvs INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org
2017-08-25T09:23:46.985840+00:00 app[worker.1]: invalid uri scheme ''
2017-08-25T09:23:46.985926+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/redis-3.3.1/lib/redis/client.rb:416:in `_parse_options'
2017-08-25T09:23:46.985928+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/redis-3.3.1/lib/redis/client.rb:81:in `initialize'
2017-08-25T09:23:46.985928+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/redis-3.3.1/lib/redis.rb:51:in `new'
2017-08-25T09:23:46.985945+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/redis-3.3.1/lib/redis.rb:51:in `initialize'
2017-08-25T09:23:46.985946+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:44:in `new'
2017-08-25T09:23:46.985948+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:44:in `build_client'
2017-08-25T09:23:46.985948+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq/redis_connection.rb:23:in `block in create'
2017-08-25T09:23:46.985949+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:169:in `call'
2017-08-25T09:23:46.985950+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:169:in `try_create'
2017-08-25T09:23:46.985951+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:81:in `block (2 levels) in pop'
2017-08-25T09:23:46.985952+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:77:in `loop'
2017-08-25T09:23:46.985971+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:77:in `block in pop'
2017-08-25T09:23:46.985972+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:76:in `synchronize'
2017-08-25T09:23:46.985972+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool/timed_stack.rb:76:in `pop'
2017-08-25T09:23:46.985973+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool.rb:89:in `checkout'
2017-08-25T09:23:46.985973+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool.rb:61:in `block in with'
2017-08-25T09:23:46.985974+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool.rb:60:in `handle_interrupt'
2017-08-25T09:23:46.985974+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/connection_pool-2.2.0/lib/connection_pool.rb:60:in `with'
2017-08-25T09:23:46.985975+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:92:in `redis'
2017-08-25T09:23:46.985976+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:106:in `redis_info'
2017-08-25T09:23:46.985976+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/lib/sidekiq/cli.rb:71:in `run'
2017-08-25T09:23:46.985977+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/sidekiq-4.2.9/bin/sidekiq:12:in `<top (required)>'
2017-08-25T09:23:46.985978+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/bin/sidekiq:23:in `load'
2017-08-25T09:23:46.985979+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/bin/sidekiq:23:in `<top (required)>'
2017-08-25T09:23:46.985979+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
2017-08-25T09:23:46.985980+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
2017-08-25T09:23:46.985981+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
2017-08-25T09:23:46.985981+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
2017-08-25T09:23:46.985982+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2017-08-25T09:23:46.985982+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
2017-08-25T09:23:46.985983+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
2017-08-25T09:23:46.985984+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
2017-08-25T09:23:46.985984+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
2017-08-25T09:23:46.985985+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
2017-08-25T09:23:46.985985+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
2017-08-25T09:23:46.985986+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
2017-08-25T09:23:46.985986+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
2017-08-25T09:23:46.985987+00:00 app[worker.1]: /app/bin/bundle:3:in `load'
2017-08-25T09:23:46.985988+00:00 app[worker.1]: /app/bin/bundle:3:in `<main>'
2017-08-25T09:23:47.278053+00:00 heroku[worker.1]: Process exited with status 1

我尝试了很多东西,但我不断得到这个错误。 我的Procfile是

web: bundle exec thin start -p $PORT
worker: bundle exec sidekiq -c 5 -v

sidekiq.rb文件是

require 'sidekiq'

Sidekiq.configure_server do |config|
  config.redis = { url: ENV['REDIS_PROVIDER'].presence || "redis://localhost:6379" }
end

Sidekiq.configure_client do |config|
  config.redis = { url: ENV['REDIS_PROVIDER'].presence || "redis://localhost:6379" }
end

我在Heroku上使用了Redis On Go插件来启用Redis服务器。 我无法弄清楚我在这里缺少什么。 谢谢你的帮助。

0 个答案:

没有答案