Start Sensu Client Error


#1

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#2

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

···

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'



from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#3

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

···

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'




from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#4

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

···

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'





from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#5

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

···

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'






from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#6

What do your Sensu RabbitMQ settings look like (minus password)?

···

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#7

Here’s an idea. Is the sensu client starting up with the same current drive letter as the SSL file? Since the drive letter isn’t specified in the path, it has to be found on the same current drive.

···

On Fri, Mar 28, 2014 at 9:08 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'







from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#8

This is the `/etc/rabbitmq/rabbitmq.config in the Sensu Server:

[
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},

               {certfile,"/etc/rabbitmq/ssl/server_cert.pem"},
               {keyfile,"/etc/rabbitmq/ssl/server_key.pem"},
               {verify,verify_peer},
               {fail_if_no_peer_cert,true}]}

]}
].

`

`And this is the sensu-client.xml in the windows client:

sensu-client

Sensu Client
This service runs a Sensu client
C:\opt\sensu\embedded\bin\ruby
C:\opt\sensu\embedded\bin\sensu-client -c C:\opt\sensu\config.json -d C:\opt\sensu\conf.d -l C:\opt\sensu\sensu-client.log

`

···

2014-03-28 17:11 GMT+01:00 Sean Porter portertech@gmail.com:

What do your Sensu RabbitMQ settings look like (minus password)?

On 28 Mar 2014 09:08, “Alberto garcia perez” albertogarci86@gmail.com wrote:

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'








from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#9

Sorry I forget this one:

C:\opt\sensu\conf.d\config.json in the windows client:

{
“rabbitmq”: {
“host”: “159.23.30.240”,
“port”: 5671,

"vhost": "/sensu",
"user": "sensu",
"password": "xxxxx",
"ssl": {
  "cert_chain_file": "/opt/sensu/ssl/cert.pem",

  "private_key_file": "/opt/sensu/ssl/key.pem"
}

}
}

···

2014-03-31 10:10 GMT+02:00 Alberto garcia perez albertogarci86@gmail.com:

This is the `/etc/rabbitmq/rabbitmq.config in the Sensu Server:

[
{rabbit, [

{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},

               {certfile,"/etc/rabbitmq/ssl/server_cert.pem"},
               {keyfile,"/etc/rabbitmq/ssl/server_key.pem"},
               {verify,verify_peer},
               {fail_if_no_peer_cert,true}]}

]}
].

`

`And this is the sensu-client.xml in the windows client:

sensu-client

Sensu Client
This service runs a Sensu client
C:\opt\sensu\embedded\bin\ruby
C:\opt\sensu\embedded\bin\sensu-client -c C:\opt\sensu\config.json -d C:\opt\sensu\conf.d -l C:\opt\sensu\sensu-client.log

`

2014-03-28 17:11 GMT+01:00 Sean Porter portertech@gmail.com:

What do your Sensu RabbitMQ settings look like (minus password)?

On 28 Mar 2014 09:08, “Alberto garcia perez” albertogarci86@gmail.com wrote:

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'









from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#10

So the client config.json doesn’t specify the drive letter, and the “current drive” is essentially undefined. Whatever the case, the sensu client can’t open the private key file. Right?

···

On Mon, Mar 31, 2014 at 1:37 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Sorry I forget this one:

C:\opt\sensu\conf.d\config.json in the windows client:

{

“rabbitmq”: {
“host”: “159.23.30.240”,
“port”: 5671,

"vhost": "/sensu",
"user": "sensu",
"password": "xxxxx",
"ssl": {
  "cert_chain_file": "/opt/sensu/ssl/cert.pem",


  "private_key_file": "/opt/sensu/ssl/key.pem"
}

}
}

2014-03-31 10:10 GMT+02:00 Alberto garcia perez albertogarci86@gmail.com:

This is the `/etc/rabbitmq/rabbitmq.config in the Sensu Server:

[
{rabbit, [

{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},

               {certfile,"/etc/rabbitmq/ssl/server_cert.pem"},
               {keyfile,"/etc/rabbitmq/ssl/server_key.pem"},
               {verify,verify_peer},
               {fail_if_no_peer_cert,true}]}

]}
].

`

`And this is the sensu-client.xml in the windows client:

sensu-client

Sensu Client
This service runs a Sensu client
C:\opt\sensu\embedded\bin\ruby
C:\opt\sensu\embedded\bin\sensu-client -c C:\opt\sensu\config.json -d C:\opt\sensu\conf.d -l C:\opt\sensu\sensu-client.log

`

2014-03-28 17:11 GMT+01:00 Sean Porter portertech@gmail.com:

What do your Sensu RabbitMQ settings look like (minus password)?

On 28 Mar 2014 09:08, “Alberto garcia perez” albertogarci86@gmail.com wrote:

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'










from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#11

How can I check that?

I think the main error is this:

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls

But I haven’t a solution yet

Thanks

···

2014-03-31 16:54 GMT+02:00 Mojo mojo.la@gmail.com:

So the client config.json doesn’t specify the drive letter, and the “current drive” is essentially undefined. Whatever the case, the sensu client can’t open the private key file. Right?

On Mon, Mar 31, 2014 at 1:37 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Sorry I forget this one:

C:\opt\sensu\conf.d\config.json in the windows client:

{

“rabbitmq”: {
“host”: “159.23.30.240”,
“port”: 5671,

"vhost": "/sensu",
"user": "sensu",
"password": "xxxxx",
"ssl": {
  "cert_chain_file": "/opt/sensu/ssl/cert.pem",



  "private_key_file": "/opt/sensu/ssl/key.pem"
}

}
}

2014-03-31 10:10 GMT+02:00 Alberto garcia perez albertogarci86@gmail.com:

This is the `/etc/rabbitmq/rabbitmq.config in the Sensu Server:

[
{rabbit, [

{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/etc/rabbitmq/ssl/cacert.pem"},

               {certfile,"/etc/rabbitmq/ssl/server_cert.pem"},
               {keyfile,"/etc/rabbitmq/ssl/server_key.pem"},
               {verify,verify_peer},
               {fail_if_no_peer_cert,true}]}

]}
].

`

`And this is the sensu-client.xml in the windows client:

sensu-client

Sensu Client
This service runs a Sensu client
C:\opt\sensu\embedded\bin\ruby
C:\opt\sensu\embedded\bin\sensu-client -c C:\opt\sensu\config.json -d C:\opt\sensu\conf.d -l C:\opt\sensu\sensu-client.log

`

2014-03-28 17:11 GMT+01:00 Sean Porter portertech@gmail.com:

What do your Sensu RabbitMQ settings look like (minus password)?

On 28 Mar 2014 09:08, “Alberto garcia perez” albertogarci86@gmail.com wrote:

I’ve modified the permissions. Now Everybody has total control and the service can’t start yet.

2014-03-28 16:55 GMT+01:00 Mojo mojo.la@gmail.com:

Since the trace says “File not found”, and assuming the filename is correct, perhaps it’s a permissions problem.

Mojo

On Fri, Mar 28, 2014 at 8:49 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi all,

Thanks for your answer.

The client certificates are a copy of the server ones.

I read it in this tutorial: http://sensuapp.org/docs/0.11/installing_sensu

"Copy cert.pem and key.pem to C:\opt\sensu\ssl

These can be obtained from the Sensu server or from another Sensu client node (located in /etc/sensu/ssl/ by default)."

So I copy them from the linux server to the windows client.

Regards

2014-03-28 16:28 GMT+01:00 JJ Asghar jjasghar@gmail.com:

Looks like you are missing a gem.

I’d read the stacktrace; it’s good practice to debug these types of issues.

Best Regards,
JJ Asghar | jjasghar@gmail.com | p: 512.619.0722

On Fri, Mar 28, 2014 at 4:56 AM, Alberto garcia perez albertogarci86@gmail.com wrote:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'











from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#12

I’m having the same issue.
I have changed on
c:\opt\sensu\conf.d\rabbitmq.json
to
{
“rabbitmq”: {
“ssl”: {“cert_chain_file”: “c:/opt/sensu/ssl/cert.pem”,
“private_key_file”: “c:/opt/sensu/ssl/key.pem”
},

Now, I get new error messages:

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:instart_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:inpost_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:ininstance_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:inbind_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:inconnect’
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:inconnect’
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.14.0/lib/sensu/daemon.rb:133:insetup_transport’
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/client.rb:251:in start' from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/client.rb:13:inblock 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:inrun_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.14.0/lib/sensu/client.rb:12:inrun’
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/bin/sensu-client:10:in <top (required)>' from C:/opt/sensu/embedded/bin/sensu-client:23:inload’
from C:/opt/sensu/embedded/bin/sensu-client:23:in `’

Any Idea how to fix this?
PS. Where can I find sensu client v.16 for Windows?

···

пятница, 28 марта 2014 г., 11:56:30 UTC+2 пользователь Alberto garcia perez написал:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards


#13

Fixed:
Edit: c:\opt\sensu\embedded\lib\ruby\gems\2.0.0\gems\sensu-em-2.4.0-x86-mingw32\lib\em\connection.rb

Problem line is:

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

New, modified line:

EventMachine::set_tls_parms(@signature, priv_key || , cert_chain ||, verify_peer)

Start service.

···

воскресенье, 11 января 2015 г., 0:00:37 UTC+2 пользователь Ihor Petruniv написал:

Hi,

The Sensu client Service in a Windows Server 2008 R2 doesn’t start.

This is the error-log:

{“timestamp”:“2014-03-28T10:55:04.943054+0100”,“level”:“warn”,“message”:“config file applied changes”,“config_file”:“C:/opt/sensu/conf.d/config.json”,“changes”:{}}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“mutator”,“name”:“only_check_output”,“description”:“returns check output”}

{“timestamp”:“2014-03-28T10:55:04.958654+0100”,“level”:“info”,“message”:“loaded extension”,“type”:“handler”,“name”:“debug”,“description”:“outputs json event data”}

C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:411:in `block in start_tls’: Could not find /opt/sensu/ssl/key.pem for start_tls (EventMachine::FileNotFoundException)

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `each'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:409:in `start_tls'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:422:in `upgrade_to_tls_if_necessary'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:233:in `post_init'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:58:in `block in new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `instance_eval'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/em/connection.rb:49:in `new'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:670:in `bind_connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:640:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-1.0.2/lib/amq/client/async/adapters/event_machine.rb:44:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/client.rb:39:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.0.0/lib/amqp/connection.rb:215:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:58:in `connect'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/rabbitmq.rb:102:in `connect'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:34:in `setup_rabbitmq'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:289:in `start'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:13:in `block in run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `call'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run_machine'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3-x86-mingw32/lib/eventmachine.rb:187:in `run'

from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/lib/sensu/client.rb:12:in `run'
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.12.3/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>'

Can you help me with this issue?

Thanks and Regards

I’m having the same issue.
I have changed on
c:\opt\sensu\conf.d\rabbitmq.json
to
{
“rabbitmq”: {
“ssl”: {“cert_chain_file”: “c:/opt/sensu/ssl/cert.pem”,
“private_key_file”: “c:/opt/sensu/ssl/key.pem”
},

Now, I get new error messages:

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:instart_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:inpost_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:ininstance_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:inbind_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:inconnect’
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:inconnect’
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.14.0/lib/sensu/daemon.rb:133:insetup_transport’
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/client.rb:251:in start' from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/client.rb:13:inblock 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:inrun_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.14.0/lib/sensu/client.rb:12:inrun’
from C:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/bin/sensu-client:10:in <top (required)>' from C:/opt/sensu/embedded/bin/sensu-client:23:inload’
from C:/opt/sensu/embedded/bin/sensu-client:23:in `’

Any Idea how to fix this?
PS. Where can I find sensu client v.16 for Windows?

пятница, 28 марта 2014 г., 11:56:30 UTC+2 пользователь Alberto garcia perez написал:


#14