Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: getaddrinfo ENOTFOUND public.dhe.ibm.com #950

Closed
abinayaa-r opened this issue Sep 20, 2023 · 6 comments
Closed

Error: getaddrinfo ENOTFOUND public.dhe.ibm.com #950

abinayaa-r opened this issue Sep 20, 2023 · 6 comments

Comments

@abinayaa-r
Copy link

I am currently working on a node.js application using ibm_db. But while installation of ibm_db using npm install ibm_db, I didn't get any error. But if I start server using npm start then I am getting below error.

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

I can see build is available as Zipped folder inside node_modules/ibm_db but its not unzipped (I didn't find any unzipped build folder). So tried navigating into nodemodule/ibm_db and i run the npm install command but getting the below error.

**> node installer/driverInstall.js

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

Error: getaddrinfo ENOTFOUND public.dhe.ibm.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26){
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'public.dhe.ibm.com'
}**

So i have also tried installing older version but I am facing the same error. Please help me in this regard to resolve it. Thank you.

@bimalkjha
Copy link
Member

@abinayaa-r Please share output of command cd C:\Users\FirstProject\ && npm ls ibm_db. Thanks.

@bimalkjha
Copy link
Member

Also, share complete output of npm install command, not partial. Thanks.

@abinayaa-r
Copy link
Author

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)


If if give npm install inside that directory then I am getting below error: ( i have also tried with newer version still same error)

→ C:\Users\FirstProject\node_modules\ibm_db>npm install
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142

ibm_db@2.5.0 install
node installer/driverInstall.js

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

Error: getaddrinfo ENOTFOUND public.dhe.ibm.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26){
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'public.dhe.ibm.com'
}

added 107 packages, and audited 108 packages in 1m

4 packages are looking for funding
run npm fund for details

2 moderate severity vulnerabilities

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

@bimalkjha
Copy link
Member

@abinayaa-r The problem is, IBM site https://public.dhe.ibm.com/ is down due to maintenance activity and hence download of clidriver fails and error. Another problem is you are using very old ibm_db version 2.5.0 which we can see in the output of npm install. If you install latest version of ibm_db@3.2.1, this problem of downloading clidriver is fixed there and ibm_db would work fine.
Check your package.json file of application and see if it has fixed the ibm_db version to 2.5.0. Change it to 3.2.1 and then run npm start.
Try below commands from command prompt:

cd C:\Users\FirstProject\
npm uninstall ibm_db
<make sure directory C:\Users\FirstProject\node_modules\ibm_db got deleted, if not, delete it manually.>
npm install ibm_db@3.2.1
npm start

If still getting issue, then cd C:\Users\FirstProject\node_modules\ibm_db and run npm install. It should work. Make sure this time you have latest version of ibm_db. Thanks.

@abinayaa-r
Copy link
Author

Before I have tried with new version.. Ok let me try again and will inform you. Thank you @bimalkjha

@bimalkjha
Copy link
Member

@abinayaa-r The file https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/ntx64_odbc_cli.zip is also available now and npm install should work fine now. But still update the ibm_db to latest. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants