0

RHEL5ボックスでgodを起動しようとすると、次のエラーが発生します。libeventおよびlibevent-develパッケージもインストールしましたが、エラーが解決しません。誰か考えがありますか?

rubyファイルhttps://github.com/mojombo/god/blob/master/lib/god/event_handler.rbにパッチを適用して、puts $!.messageとputs$!.backtraceをselfのrescueExceptionブロックに含めました。次のバックトレースを取得するためのloadメソッド。

Operation not permitted
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handlers/netlink_handler.rb:1:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handlers/netlink_handler.rb:1:in `<top (required)>'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handler.rb:22:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handler.rb:22:in `load'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:54:in `default_run'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:100:in `block in run_daemonized'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:91:in `fork'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:91:in `run_daemonized'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:21:in `dispatch'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/cli/run.rb:8:in `initialize'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/bin/god:122:in `new'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/bin/god:122:in `<top (required)>'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/bin/god:19:in `load'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/bin/god:19:in `<main>'

神のログファイルにも次の行があります

***********************************************************************
*
* Event conditions are not available for your installation of god.
* You may still use and write custom conditions using the poll system
*
***********************************************************************

また、以下はIRBからの出力です

[rails@x-rws1 current]$ RAILS_ENV=staging script/console 
Loading staging environment (Rails 2.3.11)
irb: warn: can't alias exit from irb_exit.
ruby-1.9.2-p180 :001 > God::EventHandler.load
Operation not permitted
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:184:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handlers/netlink_handler.rb:1:in `<top (required)>'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:184:in `require'
/home/rails/public_html/my_app/shared/bundle/ruby/1.9.1/gems/god-0.11.0/lib/god/event_handler.rb:22:in `load'
(irb):1:in `irb_binding'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_input'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:273:in `signal_status'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:156:in `block in eval_input'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in `block (2 levels) in each_top_level_statement'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:155:in `eval_input'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:70:in `block in start'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:69:in `catch'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/irb.rb:69:in `start'
/home/rails/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'
 => false 
4

1 に答える 1

0

netlink_handler_extの依存関係のため、godはrootユーザーからしか起動できないことに気づきました。したがって、sudo以外のユーザーとしてgod gemをインストールした場合でも、sudoを使用してgodを起動する必要があります。それで、私はついにroot特権をrailsユーザーに割り当て、rvmsudoを使ってスタートアップの神にならなければなりませんでした。

于 2011-06-09T19:06:26.650 に答える