Error on reactive datasource SSL handshake (JDBC works fine)

796 views
Skip to first unread message

Vítor Antero

unread,
May 3, 2021, 1:09:43 PM5/3/21
to Quarkus Development mailing list
Hello,

I'm using Quarkus 1.13.3.FINAL and I'm facing issues on my reactive datasource health check when deploying my application. 
I have both JDBC and reactive datasources being used. Here's how they're set up:

```
%devops.quarkus.datasource.jdbc.url= jdbc:postgresql://<host>:5432/<database>?sslmode=require
%devops.quarkus.datasource.reactive.url= postgresql://<host>:5432/<database>
%devops.quarkus.datasource.reactive.postgresql.ssl-mode=require
```

What confuses me is that the exception indicates a SSL handshake error for the reactive datasource, but the JDBC works fine.
Also, they both work fine locally.

```
2021-05-03 16:41:04,777 INFO  [io.sma.health] (vert.x-worker-thread-10) SRHCK01001: Reporting health down status: {"status":"DOWN","checks":[{"name":"Reactive PostgreSQL connections health check","status":"DOWN","data":{"<default>":"up"}},{"name":"Database connections health check","status":"UP"}]}
2021-05-03 16:41:14,572 SEVERE [io.ver.cor.net.imp.ConnectionBase] (vert.x-eventloop-thread-1) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2021-05-03 16:41:14,573 WARN  [io.qua.rea.dat.run.ReactiveDatasourceHealthCheck] (vert.x-eventloop-thread-1) Error obtaining database connection for healthcheck of datasource '<default>': io.vertx.core.VertxException: SSL handshake failed
```

I've read that reactive and JDBC datasources couldn't be used simultaneously, but it doesn't seem to the case anymore.

My need for a reactive datasource exists because I use the Vert.x RabbitMQ client. This gave me a reactive consumer, so I couldn't use my JPA repositories any longer and had to resort to reactive datasource. 

Is there some configuration I'm missing?

Thank you,
Vitor

Thomas SEGISMONT

unread,
May 4, 2021, 8:45:53 AM5/4/21
to ant...@bureauworks.com, Quarkus Development mailing list
Hi Vitor,

Reactive and JDBC datasources can be used simultaneously now. This is not the issue.

Are you using self-signed certificates? Can you try using trust-all option set to true?

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/7bcd0a96-0b57-4bb5-b611-6d126c2b6b5an%40googlegroups.com.

Thomas SEGISMONT

unread,
May 4, 2021, 5:05:30 PM5/4/21
to Vítor Antero, Quarkus Development mailing list
Glad to hear it.

I wonder why JDBC trusts all certificates by default though.

Le mar. 4 mai 2021 à 22:17, Vítor Antero <ant...@bureauworks.com> a écrit :
Hi Thomas,

It worked! Thank you for the tip!

Vítor Antero

unread,
May 5, 2021, 7:27:44 AM5/5/21
to Quarkus Development mailing list
It is indeed weird for similar things to have different defaults.
But from what I could see, there's no `trust-all` configuration for JDBC datasources.

Vítor Antero

unread,
May 7, 2021, 2:19:33 AM5/7/21
to Thomas SEGISMONT, Quarkus Development mailing list
Hi Thomas,

It worked! Thank you for the tip!

On Tue, May 4, 2021 at 9:45 AM Thomas SEGISMONT <tsegi...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages