最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ssl - Getting TLS working with the quarkus reactive messaging rabbitmq connector - Stack Overflow

programmeradmin3浏览0评论

I'm trying to get a working TLS connection using the reactive messaging connector for rabbitmq.

In testing, I can't figure out the correct properties to set in the application.properties file. I currently have something like:

quarkus.tls.rmq.trust-store.p12.path=certs/truststore.p12
quarkus.tls.rmq.trust-store.p12.password=XXXXXXXXXXX

and

mp.messaging.outgoing.requests.tls-configuration-name=rmq
mp.messaging.outgoing.requests.connector=smallrye-rabbitmq
mp.messaging.outgoing.requests.exchange.name=requests
mp.messaging.outgoing.requests.exchange.declare=false

When I run the app, i get:

2025-03-31 09:41:01,761 INFO  [io.ver.rab.imp.RabbitMQClientImpl] (vert.x-eventloop-thread-3) Attempting to reconnect to rabbitmq...
     2025-03-31 09:41:11,777 ERROR [com.rab.cli.imp.SocketFrameHandler] (vert.x-worker-thread-1) TLS connection failed: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2025-03-31 09:41:11,778 ERROR [io.ver.rab.imp.RabbitMQClientImpl] (vert.x-worker-thread-1) Could not connect to rabbitmq: java.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
 ...

and on the rabbitmq server:

rabbitmq-1  | 2025-03-31 13:12:12.361085+00:00 [notice] <0.934.0> TLS server: In state wait_finished received CLIENT ALERT: Fatal - Certificate Unknown

If I manually set the javax.SSL properties

-Djavax.ssl.trustStore=$HOME/test/rabbitmq/rabbitmq-tls/certs/truststore.p12 -Djavax.ssl.trustStorePassword=XXXXXXXXXXX

it connects and works. At this point, I feel like I can't see the forest for the trees

发布评论

评论列表(0)

  1. 暂无评论