Unable to connect to a DB2 Instance with SSL

Hi all,

Recently I'm having connection issues with a DB2 Instance after a password change. Normally I'd change my password in the connection settings and be done with it but now having errors with the SSL setting.

At first it  I received an unknown host error but after checking Data Sources//SSH/SSL I'd noticed that the use SSL checkbox was not checked.

Afterwards I received the following error message and I was unable to pinpoint to the root cause of this.

Upload id: 2020_10_26_XveXwFr46KW44QaW (file: datagrip-error.PNG)

Error message
```
[08001][-4499] [jcc][t4][2043][11550][4.26.14] Exception java.net.SocketException: Error opening socket to server XX with message: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext). ERRORCODE=-4499, SQLSTATE=08001
java.io.IOException: Invalid BER/DER data (too huge?).
```

Logs

```
2020-10-26 10:11:55,508 [4618537] INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files\JetBrains\DataGrip 2020.1.5\jbr\bin\java" -Djava.rmi.server.hostname=127.0.0.1 -Duser.timezone=UTC -Xmx2000m -Xms128m -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\util.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\trove4j.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\groovy-2.5.11.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\plugins\DatabaseTools\lib\jdbc-console.jar;C:\Users\MRT\AppData\Roaming\JetBrains\DataGrip2020.2\jdbc-drivers\DB2\4.26.14\db2jcc4_4.26.14.jar" com.intellij.database.remote.RemoteJdbcServer com.ibm.db2.jcc.DB2Driver
2020-10-26 10:11:56,447 [4619476] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 53967/RemoteDriverImpld52864bd
2020-10-26 10:11:56,988 [4620017] INFO - ution.rmi.RemoteProcessSupport - Terminating: 53967/RemoteDriverImpld52864bd
2020-10-26 10:11:57,026 [4620055] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:12:51,356 [4674385] INFO - ution.rmi.RemoteProcessSupport - Terminating: 21084/RemoteDriverImplb3cbf1de
2020-10-26 10:12:51,358 [4674387] INFO - ution.rmi.RemoteProcessSupport - Terminating: 17340/RemoteDriverImplbd2fdf26
2020-10-26 10:12:51,477 [4674506] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:12:51,499 [4674528] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:14:18,644 [4761673] INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files\JetBrains\DataGrip 2020.1.5\jbr\bin\java" -DsslCaCertPath=C:\test\DigiCertGlobalRootCA.crt -DsslClientCertPath=C:\test\DigiCertGlobalRootCA.crt -DsslClientKeyPath=C:\test\DigiCertGlobalRootCA.crt -Djava.rmi.server.hostname=127.0.0.1 -Duser.timezone=UTC -Xmx2000m -Xms128m -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\util.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\trove4j.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\groovy-2.5.11.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\plugins\DatabaseTools\lib\jdbc-console.jar;C:\Users\MRT\AppData\Roaming\JetBrains\DataGrip2020.2\jdbc-drivers\DB2\4.26.14\db2jcc4_4.26.14.jar" com.intellij.database.remote.RemoteJdbcServer com.ibm.db2.jcc.DB2Driver
2020-10-26 10:14:19,481 [4762510] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 38742/RemoteDriverImpld5dd697
2020-10-26 10:14:19,626 [4762655] INFO - atabaseCredentialsAuthProvider - Connecting as: tristan.van.der.vlugt
2020-10-26 10:14:19,626 [4762655] INFO - .DatabaseConnectionEstablisher - Connecting to: jdbc:db2://xxxx.local:50001/DB:sslConnection=true;
2020-10-26 10:14:19,721 [4762750] INFO - ution.rmi.RemoteProcessSupport - SSL MODE is VERIFY_CA
2020-10-26 10:14:20,250 [4763279] WARN - .DatabaseConnectionEstablisher - Connecting to: jdbc:db2://xxxx.local:50001/DB:sslConnection=true;
2020-10-26 10:14:20,250 [4763279] WARN - .DatabaseConnectionEstablisher - [08001][-4499] [jcc][t4][2043][11550][4.26.14] Exception java.net.SocketException: Error opening socket to server xxxx.local/10.228.68.94 on port 50.001 with message: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext). ERRORCODE=-4499, SQLSTATE=08001
2020-10-26 10:15:22,290 [4825319] INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files\JetBrains\DataGrip 2020.1.5\jbr\bin\java" -Djava.rmi.server.hostname=127.0.0.1 -Duser.timezone=UTC -Xmx2000m -Xms128m -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\util.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\trove4j.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\groovy-2.5.11.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\plugins\DatabaseTools\lib\jdbc-console.jar;C:\Users\MRT\AppData\Roaming\JetBrains\DataGrip2020.2\jdbc-drivers\DB2\4.26.14\db2jcc4_4.26.14.jar" com.intellij.database.remote.RemoteJdbcServer com.ibm.db2.jcc.DB2Driver
2020-10-26 10:15:23,232 [4826261] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 33083/RemoteDriverImpla34cdc96
2020-10-26 10:15:23,727 [4826756] INFO - ution.rmi.RemoteProcessSupport - Terminating: 33083/RemoteDriverImpla34cdc96
2020-10-26 10:15:23,769 [4826798] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:15:31,698 [4834727] INFO - ution.rmi.RemoteProcessSupport - "C:\Program Files\JetBrains\DataGrip 2020.1.5\jbr\bin\java" -Djava.rmi.server.hostname=127.0.0.1 -Duser.timezone=UTC -Xmx2000m -Xms128m -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\util.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\trove4j.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\lib\groovy-2.5.11.jar;C:\Program Files\JetBrains\DataGrip 2020.1.5\plugins\DatabaseTools\lib\jdbc-console.jar;C:\Users\MRT\AppData\Roaming\JetBrains\DataGrip2020.2\jdbc-drivers\DB2\4.26.14\db2jcc4_4.26.14.jar" com.intellij.database.remote.RemoteJdbcServer com.ibm.db2.jcc.DB2Driver
2020-10-26 10:15:32,568 [4835597] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 28048/RemoteDriverImpl87922aef
2020-10-26 10:15:32,979 [4836008] INFO - ution.rmi.RemoteProcessSupport - Terminating: 28048/RemoteDriverImpl87922aef
2020-10-26 10:15:33,049 [4836078] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:15:37,752 [4840781] INFO - ution.rmi.RemoteProcessSupport - Terminating: 38742/RemoteDriverImpld5dd697
2020-10-26 10:15:37,836 [4840865] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code -1
2020-10-26 10:16:23,250 [4886279] INFO - j.ide.actions.RevealFileAction - Exit code 1
```

I'd appreciate any help you can give on this matter

- Tristan

1 comment
Comment actions Permalink

@Tristan van der Vlugt you specified the same certificate in all fields.

Do you have separate client key and client certificates?

0

Please sign in to leave a comment.