【问题标题】:Logstash can't connect to my RabbitMQ BrokerLogstash 无法连接到我的 RabbitMQ 代理
【发布时间】:2021-05-21 23:42:39
【问题描述】:

我正在尝试将在 docker 容器中运行的 Logstash 实例连接到 Amazon MQ 代理。 我的最终目标是将 MQ 消息体插入 ElasticSearch

根据日志,我认为 Logstash 能够到达 MQ 队列,但错误消息没有提供任何其他信息:

[2021-05-21T23:30:53,226][ERROR][logstash.inputs.rabbitmq ][instance_journal_pipeline][rmq_instance_source] 
RabbitMQ connection error, will retry. {
  :error_message=>"An unknown error occurred. RabbitMQ gave no hints as to the cause. Maybe this is a configuration error (invalid vhost, for example). I recommend checking the RabbitMQ server logs for clues about this failure.", 
  :exception=>"Java::JavaIo::IOException"
}

我的输入配置如下:

input {
   rabbitmq {
     id => "rmq_instance_source"
     ack => true
     durable => true
     passive => true
     exchange => "events"
     exchange_type => "topic"
     host => "${AWS_MQ_URL}"
     user => "${AWS_MQ_USER}"
     port => "${AWS_MQ_PORT}"
     password => "${AWS_MQ_PASSWORD}"
     queue => "outbound_task_queue_name"
     key => "outbound_task_key"
     arguments => {
       # arguments reproduced from the RMQ Queue's admin page
     }
  }
}

【问题讨论】:

    标签: rabbitmq logstash logstash-configuration rabbitmq-exchange


    【解决方案1】:

    原来这是一个 SSL 配置问题。 RMQ Logstash 插件要求您指定服务器正在使用 SSL 和版本。错误消息不会告诉您是这种情况。使用您的 MQ 代理验证您的 SSL 版本。

    我在我的配置中添加了以下参数(以匹配 Amazon MQ 配置)并解决了它:

    ssl => true
    ssl_version => "TLSv1.2"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      • 1970-01-01
      • 2022-10-20
      • 1970-01-01
      • 1970-01-01
      • 2019-01-30
      相关资源
      最近更新 更多