Sensu server failure after log roation


#1

Hello,

I have installed Sensu server on RHEL 6.5 and seeing that the server doesn’t get restarted after the log rotation.

Error from the log file:

···

===========================

{“timestamp”:“2015-05-13T03:33:02.980991-0700”,“level”:“error”,“message”:“log file is not writable”,“log_file”:"/var/log/sensu/sensu-server.log"}
**/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1087:in synchronize': can't be called from trap context (ThreadError)** from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1087:innext_tick’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:172:in block in setup_writer' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:138:incall’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:138:in block in schedule_write' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:248:incall’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:248:in schedule' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:135:inschedule_write’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:53:in add' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:31:inblock (2 levels) in create_level_methods’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:79:in reopen' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-logger-1.0.0/lib/sensu/logger/stream.rb:105:inblock in setup_signal_traps’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in call' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:inrun_machine’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.18.0/lib/sensu/server/process.rb:23:inrun’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.18.0/bin/sensu-server:10:in <top (required)>' from /opt/sensu/bin/sensu-server:23:inload’
from /opt/sensu/bin/sensu-server:23:in `’

What is noticed is that, after a log rotation, the new log ownership gets changed to root:sensu from sensu:sensu

Can you please help?

Thanks