ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
190 stars 151 forks source link

SQL10013N The specified library "GSKit Error: 106" could not be loaded. SQLSTATE=42724\n"} #921

Closed msama28 closed 1 year ago

msama28 commented 1 year ago

Hi all,

Hope you are doing well,

We are facing the below issue intermittently in our production environment.

{"error":"[IBM][CLI Driver] SQL10013N The specified library \"GSKit Error: 106\" could not be loaded. SQLSTATE=42724\n"}

bimalkjha commented 1 year ago

@msama28 What is your version of db2 client/ clidriver used by ibm_db? Please share output of db2level command from the system where you have installed ibm_db. If you are using older client, then it might be a known issue as documented here: https://www.ibm.com/mysupport/s/defect/aCI3p000000kAnA/dt147150?language=en_US

If db2level command do not work, then run below commands from terminal and share the output:

cd ibm_db/installer
source ./setenv.sh
db2level
db2cli validate

Thanks.

msama28 commented 1 year ago

@bimalkjha Please find the output for the above commands:

bash-4.4$ cd ibm_db/installer bash-4.4$ source ./setenv.sh bash-4.4$ db2level DB21085I  This instance or install (instance name, where applicable: "*") uses "64" bits and DB2 code release "SQL11058" with level identifier "0609010F". Informational tokens are "DB2 v11.5.8.0", "special_26260", "DYN2301190517AMD64_26260", and Fix Pack "0". Product is installed at "/app/node_modules/ibm_db/installer/clidriver".

bash-4.4$ db2cli validate

=============================================================================== Client information for the current copy:

Client Package Type       : IBM Data Server Driver For ODBC and CLI Client Version (level/bit): DB2 v11.5.8.0 (special_26260/64-bit) Client Platform           : Linux/X8664 Install/Instance Path     : /app/node_modules/ibm_db/installer/clidriver DB2DSDRIVER_CFG_PATH value: db2dsdriver.cfg Path      : /app/node_modules/ibm_db/installer/clidriver/cfg/db2dsdriver.cfg DB2CLIINIPATH value       : db2cli.ini Path           : /app/node_modules/ibm_db/installer/clidriver/cfg/db2cli.ini db2diag.log Path          : /app/node_modules/ibm_db/installer/clidriver/db2dump/db2diag.log

=============================================================================== db2dsdriver.cfg schema validation for the entire file:

Note: The validation utility could not find the configuration file db2dsdriver.cfg. The file is searched at "/app/node_modules/ibm_db/installer/clidriver/cfg/db2dsdriver.cfg".

=============================================================================== The validation is completed.

bimalkjha commented 1 year ago

@msama28 The detail about 106 error in GSKit Doc is as below:

106 - GSK_BAD_FORMAT_OR_INVALID_PASSWORD
The keyfile password is used as an integrity check. Either the keyfile has become corrupted or the 
password ID is incorrect. 

This error should not be intermittent. If coming once, it should repeat. We need db2traces for further investigation. Write a small test program to recreate the issue and follow below steps to collect trace files:

cd ibm_db/installer
source ./setenv.sh
cd ibm_db
db2trc on -f 1.trc
node test.js  => here test.js is your program to reproduce the issue.
db2trc off
db2trc flw 1.trc 1.flw
db2trc fmt 1.trc 1.fmt
db2trc fmt -cli 1.trc 1.cli

zip all generated 1.* files and share here.

This issue should be related to the v11.5.8.0 clidriver that comes with ibm_db. You can install ibm_db using command npm install ibm_db -clidriver=v11.5.6 and verify the issue. Thanks.

msama28 commented 1 year ago

@bimalkjha I was able to resolve the issue by using clidriver=v11.5.6. Thank you for the help!