简体   繁体   English

sensu服务器,客户端和api无法启动

[英]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. 我已经按照http://sensuapp.org/docs/latest/guide的说明在CentOS-6.5上安装了sensu,但是我似乎无法启动sensu服务器,sensu客户端甚至sensu-api。 Any suggestions would be highly appreciated. 任何建议将不胜感激。

Below is the error as logged in the /var/log/sensu/sensu-server.log: 以下是/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. 是由于sensu组件(服务器,客户端,api)无法连接到RabbitMQ服务器。

Things to check: 检查事项:

  1. Is the RabbitMQ server starting and running? RabbitMQ服务器是否已启动并正在运行?

    Check with service rabbitmq-server status 检查service rabbitmq-server status

  2. Is the RabbitMQ server resolvable / reachable? RabbitMQ服务器可解析/可访问吗?

    If you're following the sensu docs, I'm assuming your RabbitMQ is local, so this shouldn't be an issue. 如果您正在关注sensu文档,那么我假设您的RabbitMQ是本地的,因此这不应该成为问题。

  3. Upgrade to the latest version of sensu (currently 0.16.0). 升级到最新版本的sensu(当前为0.16.0)。

    Fixes for crashing on RabbitMQ connection failure were included in 0.13.0 per issue #747 . 每个问题#747的 0.13.0中包含针对RabbitMQ连接失败而崩溃的修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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