Logstash Rabbitmq 连接被拒绝
Logstash Rabbitmq connection refused
已在 Windows 核心 2016 服务器中安装了 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 在主机中打开
如果我在配置中遗漏了导致此错误的任何内容,请告诉我。
提前致谢
已找到问题,这是由于服务器未启用路由。现在 Logstash 和 Rabbitmq 之间的连接已建立,索引已完成。
已在 Windows 核心 2016 服务器中安装了 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 在主机中打开 如果我在配置中遗漏了导致此错误的任何内容,请告诉我。
提前致谢
已找到问题,这是由于服务器未启用路由。现在 Logstash 和 Rabbitmq 之间的连接已建立,索引已完成。