ibmdb/node-ibm_db

Error: getaddrinfo ENOTFOUND public.dhe.ibm.com

abinayaa-r opened this issue · 3 comments

I have raised this issue 2 days ago and As it is informed to use the new version of ibm_db.

1) If I give npm i ibm_db, I didn't get any error. If i give npm start getting below error, (complete output)

Uncaught Error: Could not locate the bindings file. Tried:
→ C:\Users\FirstProject\node_modules\ibm_db\build\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\build\Debug\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\build\Release\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\out\Debug\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\Debug\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\out\Release\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\Release\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\build\default\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\compiled\18.12.1\win32\x64\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\addon-build\release\install-root\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\addon-build\debug\install-root\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\addon-build\default\install-root\odbc_bindings.node
→ C:\Users\FirstProject\node_modules\ibm_db\lib\binding\node-v108-win32-x64\odbc_bindings.node
at bindings (file:///C:/Users/FirstProject/node_modules/ibm_db/node_modules/bindings/bindings.js:126:9)
at (file:///C:/Users/FirstProject/node_modules/ibm_db/lib/odbc.js:31:31)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module._load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at (file:///C:/Users/FirstProject/sample_local.js:3:13)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js(node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at executeUserEntryPoint (node:internal/modules/run_main:81:12)
at (node:internal/main/run_main_module:23:47)

2) If if give npm install inside that directory then I am getting below error: ( ibm_db@3.2.1)

→ C:\Users\FirstProject\node_modules\ibm_db>npm install

ibm_db@3.2.1 install
node installer/driverInstall.js

platform = win32, arch=x64, node.js version =v.18.12.1


You are downloading a package which includes the Node.js module for IBM DB2/Informix. The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in C:\Users\FirstProject\node_modules\ibm_db\installer\clidriver. Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.


Downloading DB2 ODBC CLI Driver from
https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip...

ENOTFOUND:
https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip

Downloading DB2 ODBC CLI Driver from
https://github.com/ibmdb/db2drivers/raw/main/clidriver/ntx64_odbc_cli.zip...

ENOTFOUND: https://github.com/ibmdb/db2drivers/raw/main/clidriver/ntx64_odbc_cli.zip...

========================
Error: Installation of ibm_db failed

added 43 packages, and audited 44 packages in 1m

3 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

@abinayaa-r Are you able to download file https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip or https://github.com/ibmdb/db2drivers/raw/main/clidriver/ntx64_odbc_cli.zip manually? It seems your firewall or VPN configuration is blocking download of this ntx64_odbc_cli.zip file when you run your application. Resolve the download issue, ibm_db would work fine.
Alternatively, you can download file from any link, unzip it; you'll get clidriver folder. Then set system level environment variable name IBM_DB_HOME to full path of this unzipped clidriver folder. After that you install ibm_db. If IBM_DB_HOME is set, ibm_db do not download clidriver from these links. Try and let me know. Thanks.

I have manually downloaded the cli driver file from the link and also i have given npm install and set the environment vairable(IBM_DB_HOME).

It didn't give any error while installing but while starting the application getting below licensing error.

C:\Users\FirstProject> npm start
Server started
[Error: [IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968] {
error: '[ibm_db] SQL_ERROR',
sqlcode: -1598,
state: '42968'
}

@abinayaa-r Your ibm_db installation issue is fixed now. The SQL1598N error is expected in absence of valid db2connect license. It is documented well in ibm_db documentation. Please follow instructions as documented here to resolve SQL1598N error. Thanks.