RabbitMQ output using SSL in Logstash

I'm trying to use SSL in the communication between RabbitMQ (output) and Logstash, However when I run Logstash I get the error message:

[ERROR] 2019-05-06 07:58:01.228 [[main]-pipeline-manager] rabbitmq - RabbitMQ connection error, will retry. {:error_message=>"Connection to localhost:5671 failed", :exception=>"MarchHare::ConnectionRefused"}

My configuration files:

Logstash conf:
"""
...
rabbitmq {
host => "127.0.0.1"
port => 5671
user => "guest"
ssl => true
ssl_certificate_path => "/home/pc/tls-gen/basic/client/keycert.p12"
ssl_certificate_password => ""
exchange => "direct_logs"
exchange_type => "direct"
password => "guest"
key => "logstash"
durable => false
persistent => false
}

"""

rabbitmq.config:

"""
[
{rabbit, [
{ssl, true},
{ssl_listeners, [{"0.0.0.0", 5671}]},
{auth_mechanisms, ['EXTERNAL', 'PLAIN']},
{ssl_options, [{cacertfile, "/home/pc/tls-gen/basic/result/ca_certificate.pem"},
{certfile, "/home/pc/tls-gen/basic/result/server_certificate.pem"},
{keyfile, "/home/pc/tls-gen/basic/result/server_key.pem"},
{verify, verify_peer},
{fail_if_no_peer_cert, true}]}
]}
].

"""

How can I solve this problem?

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