N
Neon3mo ago
fair-rose

jdbc / ssl challenges in custom java17 jre

Howdy folks, was hoping to get some guidance on my current challenges. I am using jdbc to connect to an actian zen database for my source, and trying to write the resulting rowset to Postgres using jdbc to neon.tech. The architecture means I am having to use jlink to build a minimal java17 jre. I am getting a ssl connection failure, and so went and added the letsencrypt server certificate to the jre's keystore. I am still failing to connect. Do I need some sort of cert for my client? I am brand new to neon.tech and was just hoping to use it for a simple test db. Any guidance to articles or bestowed wisdom is greatly appreciated.
1 Reply
fair-rose
fair-roseOP3mo ago
A little extra context. The code is typescript transcoded to js, using node-java to access jdbc (actian and postgres). The stacktrace: Function Logs: sql/java.sql.DriverManager.getConnection(DriverManager.java:229) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569) at node.MethodCallBaton.invokeMethod9(MethodCallBaton.java:25) Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:370) at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:209) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510) at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455) at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426) at org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:51) ... 14 more ] { cause: nodeJava_org_postgresql_util_PSQLException {} }

Did you find this page helpful?