01 Mar 2023 09:27 AM - last edited on 01 Mar 2023 11:49 PM by MaciejNeumann
Hi, we are a SaaS Dynatrace customer and we are trying to monitor a db2 database using ssl connection. We are receiving the error message below :
Could not connect to the database using com.ibm.db2.jcc.DB2Driver: com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][4.27.25] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill() - socketInputStream.read (-1). Message: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ERRORCODE=-4499, SQLSTATE=0800
We don't know if is necessary to import a server certificate inside the /opt/dynatrace/defaultStore.jks on the active gate server where execute the db2 extension.
We tried too import the server certificate but after the import we receive a diferente message :
Error running queries for 184.108.40.206:30656: Could not connect to the database using com.ibm.db2.jcc.DB2Driver: com.ibm.db2.jcc.am.StandbyServerSQLException: DB2 SQL Error: SQLCODE=-1776, SQLSTATE= , SQLERRMC=1, DRIVER=4.27.25
Someone knows if could be some db2 configuration that is missing on the db2 server ou any idea how to solve this problem ?
Hi @rodrigogoes for sure you will need to configure the certificate on the AG where the extension is running.
Can you check if your import was correct with the guide?
But maybe also a firewall rule is needed.
The default connection port is 50000 maybe the fw is blocking requests.
Hi, the error message "Could not connect to the database using com.ibm.db2.jcc.DB2Driver" is related to the fact that your extension can't connect to DB2 Database using the default JCC driver.
We faced the same problem, we had to use another JDBC driver into the extension to make it working.
On our case, we had to add a new JAR file (JDBC driver) then we configured the python file to use it, with modification on connection string.
After that we zipped the new files and published the extension again, after deleting the old one: from UI first then AG.
We were able to connect to DB2 Database, but we got only availibility, not any other metrics.
We're still analyzing the cause: we already checks the rights for the user, it's not the problem.
Any information/help will be welcome.
Note that we were using 2 different SaaS account, on each one we had different AG's OS: Linux and Windows.
Under Windows, we find a problem with the extension as it can't create and use a temp forlder, we had to created it manually and gave it the rights for writing, it just removed the error about temp folder in the log nothing else.
Thanks & regards.