# RabbitMQ output using SSL in Logstash

**URL:** <https://discuss.elastic.co/t/rabbitmq-output-using-ssl-in-logstash/179762>\
**Category:** Logstash\
**Created:** [May 6, 2019, 12:05pm UTC](https://discuss.elastic.co/t/rabbitmq-output-using-ssl-in-logstash/179762 "2019-05-06T12:05:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manuelm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manuelm/32/40501_2.png) [@manuelm](https://discuss.elastic.co/u/manuelm)\
**Post date:** [May 6, 2019, 12:05pm UTC](https://discuss.elastic.co/t/rabbitmq-output-using-ssl-in-logstash/179762/1 "2019-05-06T12:05:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 3, 2019, 12:06pm UTC](https://discuss.elastic.co/t/rabbitmq-output-using-ssl-in-logstash/179762/2 "2019-06-03T12:06:00Z")

</div>

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