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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.