sidekiq突然停止工作

时间:2015-08-17 14:27:44

标签: ruby-on-rails ruby sidekiq bigdecimal activesupport

我正在使用sidekiq在rails应用程序中运行后台进程 它从昨天开始工作正常,但现在当我尝试在命令行界面中使用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 我试过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 --version

Rails 4.2.3

sidekiq --version

Sidekiq 3.4.2

宝石列表 - 本地| grep psych

psych (2.0.13, 2.0.8)

正在使用的硬件

Raspberry pi model B+

1 个答案:

答案 0 :(得分:1)

我建议采取以下步骤:

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

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

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

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