# RabbitMQ Input plugin: PKIX path building failed in Logstash 6.8.15

**URL:** <https://discuss.elastic.co/t/rabbitmq-input-plugin-pkix-path-building-failed-in-logstash-6-8-15/279349>\
**Category:** Logstash\
**Created:** [July 22, 2021, 7:23am UTC](https://discuss.elastic.co/t/rabbitmq-input-plugin-pkix-path-building-failed-in-logstash-6-8-15/279349 "2021-07-22T07:23:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pragatheswar](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pragatheswar](https://discuss.elastic.co/u/Pragatheswar)\
**Post date:** [July 22, 2021, 7:23am UTC](https://discuss.elastic.co/t/rabbitmq-input-plugin-pkix-path-building-failed-in-logstash-6-8-15/279349/1 "2021-07-22T07:23:45Z")

</div>

Problem statement  
Hi guys,

I ahve upgraded Logstash from 6.2.2 to 6.5.0. Post that I receive the following error when trying to configure logstash client certificates:

[2018-12-10T22:10:32,949][ERROR][logstash.inputs.rabbitmq] RabbitMQ connection error, will retry. {:error\_message=\>"sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target", :exception=\>"Java::JavaxNetSsl::SSLHandshakeException"}

Steps to reproduce:

Build server from scratch with java, logstash, and certificate signed by my own ca  
Create pkcs12 certificate:  
openssl pkcs12 -export -out LOGSTASH-1.p12 -inkey LOGSTASH-1.key -in LOGSTASH-1.crt -passout pass:test  
Update trustStore  
keytool -import -alias RMQ-master.cert -file /etc/logstash/RMQ-master.crt -keystore /opt/jre1.8.0\_65/lib/security/cacerts -storepass changeit -v  
start logstash  
Troubleshooting so far:

Downgraded from JRE 8\_0\_191 to JRE 8\_0\_65  
Imported both ca.crt and RMQ-master.crt to trustStore  
Added ca.crt to p12 certificate  
Added RMQ-master.crt to p12 certificate  
added the following to /etc/logstash/jvm.options:  
-Djavax.net.ssl.trustStore=/opt/jre1.8.0\_65/lib/security/cacerts  
-Djavax.net.ssl.trustStorePassword=changeit  
Nothing seems to be working. Can anyone help me figure out what I'm doing wrong?

Logstash version: 6.5.2  
Operating System: AWS Linux  
Config File:  
input {  
rabbitmq {  
user =\> "username"  
password =\> "pwd"  
queue =\> "queue\_1"  
host =\> "localhost"  
port =\> 5671  
durable =\> true  
ssl =\> true  
ssl\_certificate\_path =\> "/pathtocertificate/client\_certificate.p12"  
ssl\_certificate\_password =\> "xxxxx"  
}  
}

filter {  
json {  
source =\> "message"  
target =\> "message"  
}

if [pipeline] {  
if "queue\_1" in [pipeline] {  
mutate {  
add\_field =\> { "[@metadata][\_index]" =\> "indexname" }  
add\_field =\> { "[@metadata][\_type]" =\> "history" }  
}  
date {  
match =\> ["updateTime", "yyyy-MM-dd HH:mm:ssZ"]  
}  
}  
} else {  
mutate {  
add\_field =\> { "[@metadata][\_index]" =\> "logstash-%{+YYYY.MM.dd}" }  
add\_field =\> { "[@metadata][\_type]" =\> "log" }  
}  
}  
}

---

<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:** [August 19, 2021, 7:24am UTC](https://discuss.elastic.co/t/rabbitmq-input-plugin-pkix-path-building-failed-in-logstash-6-8-15/279349/2 "2021-08-19T07:24:17Z")

</div>

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