-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with ssl connection #1265
Comments
can you provide a reproducer ? (e.g with docker), we do test with SSL and it works fine for us. |
Hi, You can find here an example: In this project there are 3 tests cases: shouldSucceedToInitFromEventLoop This test calls Postgres Driver using SSL connection from a verticle running in the event loop => it works well shouldFailToInitFromWorker This test calls Postgres Driver using SSL connection from a verticle running in a worker => it does not work shouldFailRandomlyToInitFromWorkerUsingBus This test calls Postgres Driver using SSL connection from a verticle running in a worker but by delegating the call to another verticle running in event loop => it works randomly in our production environnement (but i was not able to reproduce it in my test case) |
thank I will have a look |
actually I didn't realize until now, vertx 3 does not support correctly the PG client from a worker thread and this version support is actually ending soon (end of this year). you should upgrade to Vert.x 4 your system where we do support properly using the vertx PG client in a worker. |
I'm leaving the bug open as it is an actual bug, I'm not saying the above to escape this of course |
Questions
We are trying to use vertx-sql-client driver with a Postgres database using SSL connection.
We have found that the driver is not working neither in a worker context neither in event loop context.
This check is failing, the verticle is loosing his context:
vertx-sql-client/vertx-sql-client/src/main/java/io/vertx/sqlclient/impl/SocketConnectionBase.java
Line 134 in d00b8ae
if (context != this.context) { throw new IllegalStateException(); }
This error occured only when this function is called "socket.upgradeToSslConnection" :
vertx-sql-client/vertx-pg-client/src/main/java/io/vertx/pgclient/impl/PgConnectionFactory.java
Line 137 in 9143c90
Version
Which version(s) did you encounter this bug ?
We are using vertx-sql-client 3.9.5 and vertx 3.9.5
Context
When we try to use the driver inside a worker we have an: SSL Handshake Error
We tried to use the driver without SSL connection : it works
Then we tried to use the driver in an event loop thread: it works half the time we need to restart to make it works and if we restart again it does not works
We supposed that the driver is not working with SSL (and it is worse inside a worker).
Steps to reproduce
Extra
OS Version: Debian 11
JVM version: openjdk version "1.8.0_322" 64 bits
Postgres 14
The text was updated successfully, but these errors were encountered: