Logstash fails to connect to RabbitMQ, complains about auth issue

I am deploying RabbitMQ with Elaasticsearch and Logstash using Docker Compose.

I can login with the user I create to RabbitMQ UI. However, the same credentials aren't good for Logstash:

[2020-02-11T03:18:20,616][ERROR][logstash.inputs.rabbitmq ] RabbitMQ connection error, will retry. {:error_message=>"Authentication with RabbitMQ failed or RabbitMQ version used does not support AMQP 0-9-1. Username: rabbit, vhost: /, password length: 6. Please check your configuration.", :exception=>"MarchHare::AuthenticationFailureError"}

I am using environment variables in logstash configuration, smth like:

    input {
      rabbitmq {
        # determine whether to delete the queue when the last broker disconnects
        auto_delete => "false"

        # determine whether the queue is durable or not (survives restarts)
        durable => "true"

        # exchange this component binds the queue to
        exchange => "my.metric"

        # whether other clients will be allowed to connect
        exclusive => "false"

        # routing key
        key => "my.events"

        # host rabbitmq server host
        host => "${RABBIT_HOST}"

        # queue logstash will consume events from
        queue => "my.metrics.queue"

        # configure rabbitmq user and password
        user => "${RABBIT_USER}"
        password => "${RABBIT_PASS}"
      }
    }

Username and password are propagated to the container, and as far as I understand I can use envs in config files https://www.elastic.co/guide/en/logstash/current/environment-variables.html

Logs say password length is 6 which isn't true.

Any hints on how I can solve this auth issue?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.