sensu-client: No acceptor?


#1

Hi,

When running multiple sensu-client instances on the same machine, I’m getting:

{“timestamp”:“2014-12-01T17:41:08.263088+0000”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:"/etc/sensu/conf.d"}

{“timestamp”:“2014-12-01T17:41:08.263135+0000”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/client.json"}

{“timestamp”:“2014-12-01T17:41:08.265261+0000”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}

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

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:526:in `start_server'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:221:in `setup_sockets'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:255:in `start'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:13:in `block in run'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `call'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run_machine'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:12:in `run'

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/bin/sensu-client:10:in `<top (required)>'

from /opt/sensu/bin/sensu-client:23:in `load'

from /opt/sensu/bin/sensu-client:23:in `<main>'

Can anyone shed some light on what’s going on?

Thanks,

Mathias


#2

Hi Mathias,

The Sensu client binds a TCP and UDP socket, on port 3030. The port can be configured in the client definition, “socket”: {“port”: 3031}. To run multiple clients w/ different ports, you must use separate config files and/or directories.

Sean.

···

On Dec 1, 2014 9:45 AM, “Mathias Bogaert” mathias.bogaert@gmail.com wrote:

Hi,

When running multiple sensu-client instances on the same machine, I’m getting:

{“timestamp”:“2014-12-01T17:41:08.263088+0000”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:"/etc/sensu/conf.d"}

{“timestamp”:“2014-12-01T17:41:08.263135+0000”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/client.json"}

{“timestamp”:“2014-12-01T17:41:08.265261+0000”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}

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

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:526:in `start_server’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:221:in `setup_sockets’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:255:in `start’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:13:in `block in run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `call’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run_machine’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:12:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/bin/sensu-client:10:in `<top (required)>’

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

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

Can anyone shed some light on what’s going on?

Thanks,

Mathias


#3

Never mind, it’s 3030, sensu-client does listen.

···

On Monday, 1 December 2014 17:45:04 UTC, Mathias Bogaert wrote:

Hi,

When running multiple sensu-client instances on the same machine, I’m getting:

{“timestamp”:“2014-12-01T17:41:08.263088+0000”,“level”:“warn”,“message”:“loading config files from directory”,“directory”:"/etc/sensu/conf.d"}

{“timestamp”:“2014-12-01T17:41:08.263135+0000”,“level”:“warn”,“message”:“loading config file”,“file”:"/etc/sensu/conf.d/client.json"}

{“timestamp”:“2014-12-01T17:41:08.265261+0000”,“level”:“warn”,“message”:“loading extension files from directory”,“directory”:"/etc/sensu/extensions"}

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

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:526:in `start_server’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:221:in `setup_sockets’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:255:in `start’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:13:in `block in run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `call’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run_machine’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:187:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/lib/sensu/client.rb:12:in `run’

from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.16.0/bin/sensu-client:10:in `<top (required)>’

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

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

Can anyone shed some light on what’s going on?

Thanks,

Mathias