Sensu http_socket

Hi everybody,

I was configuring 2 sensu-client in same host, the first one is ok, but when I configure the second one and try to start, I receive a message error “the port is in use”. I changed the socket port and http_socket port but I can’t start the second client, any idea?

PS: The first client is running on ports 3030 and 3031

config.json

{

“client”: {

“name”:“sensu-client”,

“address”:“192.168.1.83”,

“subscriptions”: [

“OS”

],

“http_socket”: {

“bind”: “127.0.0.1”,

“port”: 3036,

“socket”: {

“bind”: “127.0.0.1”,

“port”: 3035

}

}

}

}

Message log:

{“timestamp”:“2017-03-20T12:22:56.290085-0300”,“level”:“warn”,“message”:“applied sensu client overrides”,“client”:{“name”:“sensu-client”,“address”:“192.168.1.83”,“subscriptions”:[“OS”,“client:sensu-client”],“http_socket”:{“bind”:“127.0.0.1”,“port”:3036,“socket”:{“bind”:“127.0.0.1”,“port”:3035}}}}

{“timestamp”:“2017-03-20T12:22:56.293296-0300”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/home/sensu/sensu/extensions"}

{“timestamp”:“2017-03-20T12:22:56.293353-0300”,“level”:“info”,“message”:“configuring sensu spawn”,“settings”:{“limit”:12}}

{“timestamp”:“2017-03-20T12:22:56.382136-0300”,“level”:“warn”,“message”:“transport connection error”,“reason”:“tcp connection lost”}

/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:530:in `start_tcp_server’: no acceptor (port is in use or requires root privileges) (RuntimeError)

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:530:in `start_server’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:394:in `setup_json_socket’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:434:in `setup_sockets’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:511:in `block in start’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/daemon.rb:278:in `block in setup_transport’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-transport-7.0.2/lib/sensu/transport.rb:26:in `block in connect’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:151:in `set_deferred_status’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:191:in `succeed’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-transport-7.0.2/lib/sensu/transport/rabbitmq.rb:222:in `block in setup_connection’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:151:in `set_deferred_status’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:191:in `succeed’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:682:in `connection_successful’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:1040:in `handle_open_ok’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:1136:in `block in class:Session

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:959:in `receive_frameset’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:933:in `receive_frame’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:671:in `receive_data’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:194:in `run_machine’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:194:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:19:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/exe/sensu-client:10:in `<top (required)>’

from /opt/sensu/bin/sensu-client:22:in `load’

from /opt/sensu/bin/sensu-client:22:in `’

Thanks

Marcos

Hi,

My bad, I changed the configuration and now is ok!

Please disregard this message.

Thanks

Marcos

···

Em segunda-feira, 20 de março de 2017 12:37:44 UTC-3, Marcos Dutra escreveu:

Hi everybody,

I was configuring 2 sensu-client in same host, the first one is ok, but when I configure the second one and try to start, I receive a message error “the port is in use”. I changed the socket port and http_socket port but I can’t start the second client, any idea?

PS: The first client is running on ports 3030 and 3031

config.json

{

“client”: {

“name”:“sensu-client”,

“address”:“192.168.1.83”,

“subscriptions”: [

“OS”

],

“http_socket”: {

“bind”: “127.0.0.1”,

“port”: 3036,

“socket”: {

“bind”: “127.0.0.1”,

“port”: 3035

}

}

}

}

Message log:

{“timestamp”:“2017-03-20T12:22:56.290085-0300”,“level”:“warn”,“message”:“applied sensu client overrides”,“client”:{“name”:“sensu-client”,“address”:“192.168.1.83”,“subscriptions”:[“OS”,“client:sensu-client”],“http_socket”:{“bind”:“127.0.0.1”,“port”:3036,“socket”:{“bind”:“127.0.0.1”,“port”:3035}}}}

{“timestamp”:“2017-03-20T12:22:56.293296-0300”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:“/home/sensu/sensu/extensions”}

{“timestamp”:“2017-03-20T12:22:56.293353-0300”,“level”:“info”,“message”:“configuring sensu spawn”,“settings”:{“limit”:12}}

{“timestamp”:“2017-03-20T12:22:56.382136-0300”,“level”:“warn”,“message”:“transport connection error”,“reason”:“tcp connection lost”}

/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:530:in `start_tcp_server’: no acceptor (port is in use or requires root privileges) (RuntimeError)

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:530:in `start_server’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:394:in `setup_json_socket’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:434:in `setup_sockets’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:511:in `block in start’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/daemon.rb:278:in `block in setup_transport’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-transport-7.0.2/lib/sensu/transport.rb:26:in `block in connect’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:151:in `set_deferred_status’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:191:in `succeed’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-transport-7.0.2/lib/sensu/transport/rabbitmq.rb:222:in `block in setup_connection’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:151:in `set_deferred_status’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/em/deferrable.rb:191:in `succeed’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:682:in `connection_successful’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:1040:in `handle_open_ok’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:1136:in `block in class:Session

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:959:in `receive_frameset’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:933:in `receive_frame’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/amqp-1.6.0/lib/amqp/session.rb:671:in `receive_data’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:194:in `run_machine’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/eventmachine-1.2.2/lib/eventmachine.rb:194:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/lib/sensu/client/process.rb:19:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-0.28.4/exe/sensu-client:10:in `<top (required)>’

from /opt/sensu/bin/sensu-client:22:in `load’

from /opt/sensu/bin/sensu-client:22:in `’

Thanks

Marcos