DBeaver : Error on connecting to DB2 database using SSL Certificate
0
votes
0
answers
55
views
Trying to connect to DB2 database through DBeaver (DB2 for LUW) using SSL certificate on Windows 11 machine. I have the SSL certificate which I have converted to .jks file using the command
keytool -importcert -trustcacerts -alias -file C:\Users\db_prod_certificate.cer -keystore C:\Users\db_prod_store.jks -storepass
and add the below parameters in driver properties
sslConnection = true, sslTrustStoreLocation = C:\Users\db_prod_store.jks , sslTrustStorePassword =
however the following error comes up while trying to test the connection
Connection failed: could not establish a SSL connection with the server. The connection has been configured to use hostname validation and the servers TLS certificate does not contain a hostname or IP address which matches the value configured by the client. ERRORCODE=-20576, SQLSTATE=08001
Log details - DBeaver-debug.log
2025-07-15 01:31:18.521 - System suspend detected! Reinitialize all remote connections.
2025-07-15 07:11:17.549 - System suspend detected! Reinitialize all remote connections.
> Start Log View [org.eclipse.ui.views.log 1.4.400.v20240424-0956]
> Start DBeaver Data Transfer [org.jkiss.dbeaver.data.transfer 2.0.118.202407071610]
2025-07-15 07:31:14.873 - Service 'org.jkiss.dbeaver.runtime.ui.UIServiceSecurity' not found
2025-07-15 07:31:17.473 - Connect with 'jdbc:db2://reportdb.dev.suite.maximo.com:30641/BLUDB' (db2-1980e48522b-28b563d6124cdf25)
2025-07-15 07:31:17.475 - Execution context opened (jdbc:db2://reportdb.dev.suite.maximo.com:30641/BLUDB; Main; 3)
2025-07-15 07:31:18.044 - [jcc][t4][4.34.30] Connection failed: could not establish a SSL connection with the server. The connection has been configured to use hostname validation and the servers TLS certificate does not contain a hostname or IP address which matches the value configured by the client. ERRORCODE=-20576, SQLSTATE=08001
com.ibm.db2.jcc.am.SqlNonTransientConnectionException: [jcc][t4][4.34.30] Connection failed: could not establish a SSL connection with the server. The connection has been configured to use hostname validation and the servers TLS certificate does not contain a hostname or IP address which matches the value configured by the client. ERRORCODE=-20576, SQLSTATE=08001
at com.ibm.db2.jcc.am.b5.a(b5.java:800)
at com.ibm.db2.jcc.am.b5.a(b5.java:66)
at com.ibm.db2.jcc.am.b5.a(b5.java:133)
at com.ibm.db2.jcc.t4.b.ak(b.java:8427)
at com.ibm.db2.jcc.t4.b.completeConnect(b.java:723)
at com.ibm.db2.jcc.t4.b.a(b.java:488)
at com.ibm.db2.jcc.t4.b.a(b.java:434)
at com.ibm.db2.jcc.t4.b.(b.java:372)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:259)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:215)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:491)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:117)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCConnectionOpener.run(JDBCConnectionOpener.java:109)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCConnectionOpener.run(JDBCConnectionOpener.java:83)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:222)
at org.jkiss.dbeaver.ext.db2.model.DB2DataSource.openConnection(DB2DataSource.java:286)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:106)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:102)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.(JDBCRemoteInstance.java:61)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:120)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:104)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.(JDBCDataSource.java:95)
at org.jkiss.dbeaver.ext.db2.model.DB2DataSource.(DB2DataSource.java:133)
at org.jkiss.dbeaver.ext.db2.DB2DataSourceProvider.openDataSource(DB2DataSourceProvider.java:101)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1390)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect0(DataSourceDescriptor.java:1260)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:1050)
at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:78)
at org.jkiss.dbeaver.runtime.jobs.ConnectionTestJob.run(ConnectionTestJob.java:103)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:117)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Asked by max092012
(101 rep)
Jul 15, 2025, 12:41 AM
Last activity: Jul 15, 2025, 01:38 PM
Last activity: Jul 15, 2025, 01:38 PM