简体   繁体   中英

sensu server, client and api won't start

I have installed sensu on CentOS-6.5 using the instructions from http://sensuapp.org/docs/latest/guide but i cannot seem to start the sensu-server, sensu-client or even the sensu-api. Any suggestions would be highly appreciated.

Below is the error as logged in the /var/log/sensu/sensu-server.log:

{"timestamp":"2014-10-20T16:58:25.875472+0800","level":"warn","message":"config file does not exist or is not readable","file":"/etc/sensu/config.json"}
{"timestamp":"2014-10-20T16:58:25.875800+0800","level":"warn","message":"ignoring config file","file":"/etc/sensu/config.json"}
{"timestamp":"2014-10-20T16:58:25.875986+0800","level":"warn","message":"loading config files from directory","directory":"/etc/sensu/conf.d"}
{"timestamp":"2014-10-20T16:58:25.876180+0800","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/rabbitmq.json"}
{"timestamp":"2014-10-20T16:58:25.876383+0800","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/redis.json"}
{"timestamp":"2014-10-20T16:58:25.876656+0800","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/redis.json","changes":{"redis":[null {"host":"localhost","port":6379}]}}
{"timestamp":"2014-10-20T16:58:25.876852+0800","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/client.json"}
{"timestamp":"2014-10-20T16:58:25.877063+0800","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/client.json","changes":{"client":[null,{"name":"george-db3","address":"SUBSTITUTE_ME","subscriptions":["all"]}]}}
{"timestamp":"2014-10-20T16:58:25.877277+0800","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/api.json"}
{"timestamp":"2014-10-20T16:58:25.877513+0800","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/api.json","changes":{"api":[null {"host":"localhost","port":4567,"user":"admin","password":"REDACTED"}]}}
{"timestamp":"2014-10-20T16:58:25.897183+0800","level":"warn","message":"loading extension files from directory","directory":"/etc/sensu/extensions"}
{"timestamp":"2014-10-20T16:58:25.897740+0800","level":"warn","message":"loaded extension","type":"mutator","name":"json","description":"returns JSON formatted event data"}
{"timestamp":"2014-10-20T16:58:25.897923+0800","level":"warn","message":"loaded extension","type":"mutator","name":"ruby_hash","description":"returns ruby hash event data"}
{"timestamp":"2014-10-20T16:58:25.898093+0800","level":"warn","message":"loaded extension","type":"mutator","name":"only_check_output","description":"returns check output"}
{"timestamp":"2014-10-20T16:58:25.898257+0800","level":"warn","message":"loaded extension","type":"handler","name":"debug","description":"returns raw event data"}
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:673:in `connect_server': unable to resolve server address (EventMachine::ConnectionError)
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:673:in `bind_connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-em-2.4.0/lib/eventmachine.rb:649:in `connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp/session.rb:445:in `connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-1.3.0/lib/amqp.rb:242:in `connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-1.0.0/lib/sensu/transport/rabbitmq.rb:17:in `connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-transport-1.0.0/lib/sensu/transport.rb:22:in `connect'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/daemon.rb:133:in `setup_transport'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/server.rb:726:in `start'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/lib/sensu/server.rb:14: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.14.0/lib/sensu/server.rb:13:in `run'
    from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.14.0/bin/sensu-server:10:in `<top (required)>'
    from /opt/sensu/bin/sensu-server:23:in `load'
    from /opt/sensu/bin/sensu-server:23:in `<main>'

Typically the message

unable to resolve server address (EventMachine::ConnectionError)

Is a result of a sensu component (server, client, api) not being able to connect to your RabbitMQ server.

Things to check:

  1. Is the RabbitMQ server starting and running?

    Check with service rabbitmq-server status

  2. Is the RabbitMQ server resolvable / reachable?

    If you're following the sensu docs, I'm assuming your RabbitMQ is local, so this shouldn't be an issue.

  3. Upgrade to the latest version of sensu (currently 0.16.0).

    Fixes for crashing on RabbitMQ connection failure were included in 0.13.0 per issue #747 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM