sidekiq 突然停止工作

sidekiq suddenly stops working

我在 rails 应用程序中使用 sidekiq 到 运行 后台进程。
从昨天开始它运行良好,但现在当我尝试在命令行界面中使用 sidekiq 运行 它时,我得到

WARN: Unresolved specs during Gem::Specification.reset:
      minitest (~> 5.1)
      rails-dom-testing (>= 1.0.5, ~> 1.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::BASE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_ALL
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_NaN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_INFINITY
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_UNDERFLOW
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_OVERFLOW
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::EXCEPTION_ZERODIVIDE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_MODE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_UP
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_DOWN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_UP
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_DOWN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_CEILING
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_FLOOR
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::ROUND_HALF_EVEN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NaN
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_ZERO
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_ZERO
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_FINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_FINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_POSITIVE_INFINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::SIGN_NEGATIVE_INFINITE
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::INFINITY
/usr/lib/ruby/2.2.0/armv6l-linux-eabihf/bigdecimal.so: warning: already initialized constant BigDecimal::NAN
2015-08-17T13:50:43.622Z 1730 TID-5eckc INFO: Booting Sidekiq 3.4.2 with redis options {:url=>"redis://localhost:6379/3", :namespace=>"s
idekiq"}
undefined method `add_builtin_type' for Psych:Module
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/ordered_hash.rb:3:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `block in eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `each_value'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies/autoload.rb:70:in `eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support.rb:69:in `eager_load!'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:56:in `each'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/usr/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/usr/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `each'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `call'
/usr/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/usr/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/usr/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/home/roberto/.gem/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
/home/roberto/web/boardInterface/config/environment.rb:5:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:241:in `require'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:241:in `boot_system'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/lib/sidekiq/cli.rb:50:in `run'
/home/roberto/.gem/ruby/2.2.0/gems/sidekiq-3.4.2/bin/sidekiq:13:in `<top (required)>'
/home/roberto/.gem/ruby/2.2.0/bin/sidekiq:23:in `load'
/home/roberto/.gem/ruby/2.2.0/bin/sidekiq:23:in `<main>'

我在 6379 端口有 redis-server 运行ning。
我试过 gem update,但没有任何改变。
删除 gem bigdecimal 会消除 already initialized 警告,但 undefined method 错误仍然存​​在并导致 sidekiq 崩溃。
我在一天的研究中用谷歌搜索没有得到有用的结果。
提前致谢。

正在使用的软件

uname -a

Linux PiServer 4.0.8-2-ARCH #1 PREEMPT Tue Jul 14 18:45:50 MDT 2015 armv6l GNU/Linux

ruby --version

ruby 2.2.2p95 (2015-04-13 revision 50295) [armv6l-linux-eabihf]

rails --版本

Rails 4.2.3

sidekiq --version

Sidekiq 3.4.2

gem 列表 --local | grep psych

psych (2.0.13, 2.0.8)

正在使用的硬件

Raspberry pi model B+

我建议采取以下步骤:

  • 删除 ruby 的当前版本以及依赖它的所有库、gem 和文件。

  • 通过 RVM 安装 ruby。在 RPi 上编译需要一生,但 可能 有助于避免 BigDecimal 错误。

  • 在您的项目 require 'grape' 中,根据 issue #181 on GitHub 可能 有助于解决 add_builtin_type 错误。

我无法在我的 Π 上重现错误。