Connect to PostgreSQL database

klefevre
Tera Contributor

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&amp;sslMode=verify-ca&amp;sslCert=D:\Certificates\client-cert.crt&amp;sslKey=D:\Certificatesclient-key.key&amp;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&#10;java.sql.SQLException: org.postgresql.util.PSQLException: The connection attempt failed. &#10;org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:364)&#10;org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:54)&#10;org.postgresql.jdbc.PgConnection.&lt;init&gt;(PgConnection.java:273)&#10;org.postgresql.Driver.makeConnection(Driver.java:446)&#10;org.postgresql.Driver.connect(Driver.java:298)&#10;java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)&#10;java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)&#10;com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:146)&#10;com.service_now.mid.connections.jdbc.JDBCConnection.lambda$connect$0(JDBCConnection.java:107)&#10;com.glide.util.LogContext$Frame.run(LogContext.java:212)&#10;com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:105)&#10;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