share facebook facebook2 twitter menu hatena pocket slack

2014.10.23 THU

sensu-client 0.13.2 for Windows を利用する際の注意点(SSL 利用時のみ)

川原 洋平

WRITTEN BY川原 洋平

cloudpack の かっぱこと 川原 洋平@inokara)です。

はじめに

意気揚々と sensu-client for Windows をセットアップしようとしたらハマったのでメモ。まだ、解決していませんのでご注意下さい。


以下のようなエラーが出て sensu-client が起動しません

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/em/connection.rb:419:in `set_tls_parms': wrong number of arguments (6 for 4) (ArgumentError)
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/em/connection.rb:419:in `start_tls'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp/session.rb:1154:in `upgrade_to_tls_if_necessary'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp/session.rb:571:in `post_init'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/em/connection.rb:58:in `block in new'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/em/connection.rb:49:in `new'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/eventmachine.rb:679:in `bind_connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/eventmachine.rb:649:in `connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp/session.rb:445:in `connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp.rb:242:in `connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-1.0.0/lib/sensu/transport/rabbitmq.rb:17:in `connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-1.0.0/lib/sensu/transport.rb:22:in `connect'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/daemon.rb:133:in `setup_transport'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/client.rb:244:in `start'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/client.rb:13:in `block in run'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/eventmachine.rb:187:in `call'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0-x86-mingw32/lib/eventmachine.rb:187:in `run'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/lib/sensu/client.rb:12:in `run'
  from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.13.1/bin/sensu-client:10:in `<top (required)>'
  from C:/opt/sensu/embedded/bin/sensu-client:23:in `load'
  from C:/opt/sensu/embedded/bin/sensu-client:23:in `<main>'

原因や議論

まだ、解決されていないようです。そもそも、問題なのかも不明です。


取り急ぎの対処

sensu-em を修正する

ここでも書かれていますが、ここを下記のように修正することで回避は可能です。

EventMachine::set_tls_parms(@signature, priv_key || '', cert_chain || '', verify_peer, (use_tls ? true : false), cipher_list || '')

EventMachine::set_tls_parms(@signature, priv_key || '', cert_chain || '', false)

ちょっと現実的ではないようです。。。

0.12.6 を利用する


取り急ぎ

引続き、こちらに関しては追っかけていきます。

元記事はこちらです。
sensu-client 0.13.2 for Windows を利用する際の注意点(SSL 利用時のみ)