Logstash Rabbitmq连接被拒绝

问题描述 投票:0回答:1

已经在Windows核心2016 Server中安装了Elasticsearch-6.6.0和kibana-6.6.0它已经启动并运行,我不得不从Rabbitmq索引数据,所以下载并解压缩logstash-6.0.0并为rabbitmq创建了一个配置文件如下

input {
    rabbitmq {
        arguments => { "x-ha-policy" => "all" }
        host => "172.xx.xx.xx"
        queue => "xx.flow.queue"
        #durable => true
        key => "flowtrack"
        exchange => "xx.test.exchange"
        threads => 120
        exclusive => false
        prefetch_count => 512
        vhost => "/"
        port => 5672
        user => "usr"
        password => "Pass@123"
    }
}
output {
  elasticsearch {
    hosts => ["172.xx.xx.xx:9200"]
  }
}

通过命令行运行logstash如下

    c:\logstash-6.0.0>bin\logstash -f config\rabbitmq.conf

但它会抛出如下错误

 [2019-02-20T23:01:28,696][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5672 refused", :exception=>"MarchHare::ConnectionRefused"}
    [2019-02-20T23:01:28,696][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5672 refused", :exception=>"MarchHare::ConnectionRefused"}

端口5672在主机中打开让我知道我是否错过了导致此错误的配置中的任何内容。

提前致谢

elasticsearch rabbitmq logstash kibana-6
1个回答
0
投票

发现问题,原因是路由未启用。现在能够连接和索引完成。

此致,Vinoth Kannan P.

© www.soinside.com 2019 - 2024. All rights reserved.