Closed tonxxd closed 3 months ago
@tonxxd First of all, you have not read this documentation that talks about SSL connection and we have also mentioned it to check in point 2 of "For Connection Related Issues" on new issue template: https://github.com/ibmdb/node-ibm_db/blob/master/APIDocumentation.md#SSLConnection
In this documentation, we have mentioned to use SECURITY=SSL;
in connection string, but I don't see you are using it.
ibm_db do not support JDBC driver keywords or any Java Key Store format certificate. It accepts certificates generated using GSKit only.
Your connection string has two issues:
sslConnection=true;
and use Security=SSL;
instead.SSLServerCertificate
keyword must be full path a certificate generated for non-Java application on Db2 Server. It normally has .arm or .cert or .pem extension. ibm_db do not support jks format certificate. You need to get certificate generated using GSKit or .kdb and *.sth files. Thanks.Hi @bimalkjha thanks for the quick reply. Sorry I actually use Security=SSL in the code, I copy pasted the snippet from the customer without changing it. I think the issue is definitely the certificate format then. I will ask them to give me the correct one. Since I don't see mentions of the non supported formats in the documentation in GitHub maybe is something that could be added for people like me that are not db experts. Thanks!
Updated doc with info in latest release. Hence closing the issue now. Thanks.
Please provide below information while opening an issue to understand your problem
db2level
command from Db2 database system:For non-Windows system, output of below commands from terminal:
uname uname -m node -v npm ls ibm_db db2level echo $IBM_DB_HOME echo $PATH echo $LD_LIBRARY_PATH $DYLD_LIBRARY_PATH
Linux x86_64 v20.11.1 (node:50) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. (Use
node --trace-warnings ...
to show where the warning was created) flowpilot@0.1.0 /app `-- ibm_db@3.2.3bash: db2level: command not found
Please provide below problem specific info:
=========================================
For Connection related issue
SSLServerCertificate
keyword in connection string or using your own keystore db? : SSLServerCertificate[IBM][CLI Driver] SQL10013N The specified library "GSKit Error: 17" could not be loaded. SQLSTATE=42724
Hi I am getting this error when trying to connect to a db2 instance. I got the certificate from the user and i am trying to use this connection string
DATABASE=USIBMVRDP2H;HOSTNAME=stfmvs1q.pok.ibm.com;UID=USER;PWD=xxx;PORT=5521;PROTOCOL=TCPIP;sslConnection=true;SSLServerCertificate=/uploads/9c65f730-623a-4650-af48-1223ce87243a;
where /uploads/9c65f730-623a-4650-af48-1223ce87243a is the certificate in jks format
It seems i can't find a lot of documentation online about the gskit library, do you think the error is a missing library in the docker build (and if yes how can i install it) or is it something else?
Thanks