Connect to PostgreSQL database
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2025 08:07 AM
Running on Xanadu, I'm trying to connect to a PostgreSQL database going through the ECC queue. I'm using code I developed to interface with DB2 through the ECC queue. The PostgreSQL database driver is installed on the MID Server. So are the required certificates.
Here's the sanitized connection string: jdbc:postgresql://<userID>:<password>@10.49.216.169:5432/user_mgmt?ssl=true&sslMode=verify-ca&sslCert=D:\Certificates\client-cert.crt&sslKey=D:\Certificatesclient-key.key&sslTrustCert=D:\Certificates\server-ca.crt
Here's the top of the message I'm finding in the reply ECC queue:
results error="SQLState: null java.sql.SQLException: org.postgresql.util.PSQLException: The connection attempt failed. org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:364) org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54) org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:273) org.postgresql.Driver.makeConnection(Driver.java:446) org.postgresql.Driver.connect(Driver.java:298) java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190) com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:146) com.service_now.mid.connections.jdbc.JDBCConnection.lambda$connect$0(JDBCConnection.java:107) com.glide.util.LogContext$Frame.run(LogContext.java:212) com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:105) com.service_now.
The MID Server logs show 3 attempts to connect. Nothing particularly useful shows up in the logs.
Our MID server is running on Windows. I suspect the notation to tell the driver where to find the certificates is incorrect, but can't find any help on how to encode the directory path on a Windows server.
Has anyone managed to connect to a PostgreSQL server from a Xanadu MID server running on Windows? Any help on how to successfully connect would be greatly appreciated.
0 REPLIES 0