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.
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
[jcc]Failed to create connection. SQLCODE: -4499 SQLSTATE: 08001 Message: [jcc][t4][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 :
java com.ibm.db2.jcc.DB2Jcc -version
IBM Data Server Driver for JDBC and SQLJ 4.25.13
That proves JCC version is correct (More than 4.1)
Ran telnet from local windows machine towards DB2 linux machine on desired TLSv1.2 enabled port. It is success.