我已经按照http://sensuapp.org/docs/latest/guide的说明在CentOS-6.5上安装了sensu,但是我似乎无法启动sensu服务器,sensu客户端甚至sensu-api。任何建议将不胜感激。
以下是/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>'
最佳答案
通常消息
unable to resolve server address (EventMachine::ConnectionError)
是由于sensu组件(服务器,客户端,api)无法连接到RabbitMQ服务器。
检查事项:
RabbitMQ服务器是否已启动并正在运行?
用
service rabbitmq-server status
检查RabbitMQ服务器可解析/可访问吗?
如果您正在关注sensu文档,那么我假设您的RabbitMQ是本地的,因此这不应该成为问题。
升级到最新版本的sensu(当前为0.16.0)。
每个问题#747的0.13.0中包含了RabbitMQ连接失败时崩溃的修复程序。
关于mysql - sensu服务器,客户端和api无法启动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26466408/