Rabbitmq和logstash配置不工作



我试图将logstash链接到将在elasticsearch中索引的队列中读取消息。我最初让它与发送消息到logstash端口的托运人一起工作,但现在即使这样也不能工作。尝试运行logstash配置文件时的错误:

RabbitMq connection error: . Will reconnect in 10 seconds... {:level=>error}
//not sure if the next piece is related:
WARN: org.elasticsearch.discovery.zen.ping.unicast: [Hellstrom, Damion] failed to send ping 
     to [[#zen_unicast_2#][inet[localhost/127.0.0.1:9301]]]
    org.elasticsearch.transport.ReceiveTimeoutTransportException: []
  [inet[localhost/127.0.0.1:9301]][discovery/zen/unicast] request_id [0] timed out after [3752ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
    log4j, [2014-03-17T14:48:20.197]  WARN: org.elasticsearch.discovery.zen.ping.
    unicast:   [Hellstrom, Damion] failed to send ping to 
    [[#zen_unicast_4#]  [inet[localhost/127.0.0.1:9303]]]
    org.elasticsearch.transport.ReceiveTimeoutTransportException: 
    []                [inet[localhost/127.0.0.1:9303]][discovery/zen/unicast] 
   request_id [3] 
    timed out after [3752ms]
    at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
     log4j, [2014-03-17T14:48:20.198]  WARN: org.elasticsearch.discovery.zen.ping.unicast: 
    [Hellstrom, Damion] failed to send ping to 
     [[#zen_unicast_3#]    [inet[localhost/127.0.0.1:9302]]]

我真的很感激在这方面的帮助。我花了整个周末试图让它工作。我一开始也试过Redis,但它有自己的一组错误。

Oh yes is my conf file:

input {
 rabbitmq {
    queue => "input.queue"
    host => "192.xxx.x.xxx"
    exchange => "exchange.output"
    vhost => "myhost"
  }
 }
output {
elasticsearch {
    embedded => true
     index => "board-feed"
}

}

问题与RabbitMQ服务器的身份验证有关。对于RabbitMQ传输,user/password的默认值是guest/guest,默认情况下,在Rabbit中只有在本地连接(到127.0.0.1)时才有效,而你正在连接到192.x . x.x.xxx。(https://www.rabbitmq.com/access-control.html)

我的猜测是,当它以前工作时,你正在运行Logstash服务器和RabbitMQ在同一台机器上。

要解决这个问题,在RabbitMQ中设置一个帐户,并填写RabbitMQ输出的用户/密码字段以匹配。

相关内容

  • 没有找到相关文章

最新更新