0

I am trying to connect to DB2 version 11.x on linux from my local windows machine. Ran below command in by ibm's jre/bin, but still getting an error.

Command

C:\Program Files (x86)**>java com.ibm.db2.jcc.DB2Jcc -url "jdbc:db2://serverip:50001/dbname:sslConnection=true;sslCertLocation=D:\path_to_certificate;" -user dbusername -password dbpassword

Error

[jcc][10512][13714]Failed to create connection. SQLCODE: -4499 SQLSTATE: 08001 Message: [jcc][t4][2030][11211][4.25.13] 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: Received fatal alert: handshake_failure. ERRORCODE=-4499, SQLSTATE=08001

Note - I have given .cer certificate file in certificate path (As in this example, .arm is given), will it matter?

What am I doing wrong?

Analysis 1 Ran below command on path, output is :

Command

java com.ibm.db2.jcc.DB2Jcc -version

Output

IBM Data Server Driver for JDBC and SQLJ 4.25.13

That proves JCC version is correct (More than 4.1)

Analysis 2

Ran telnet from local windows machine towards DB2 linux machine on desired TLSv1.2 enabled port. It is success.

asked Feb 6, 2020 at 10:23
9
  • What port is your Db2 running on, and what port are you trying to connect to? Commented Feb 6, 2020 at 11:12
  • The URL you're connecting to seem incomplete. Commented Feb 6, 2020 at 12:20
  • @Lennart - Port is 50001 on which SSL is enabled by DBA team. Commented Feb 6, 2020 at 14:44
  • @mustaccio - Have copied whole URL. While posting it somehow removed few bits. Commented Feb 6, 2020 at 14:46
  • Still missing the database namee Commented Feb 6, 2020 at 14:57

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.