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

Impossible to install without internet connection #424

Closed
vincenthodicq opened this issue Jul 2, 2018 · 7 comments
Closed

Impossible to install without internet connection #424

vincenthodicq opened this issue Jul 2, 2018 · 7 comments

Comments

@vincenthodicq
Copy link

Hello,
I have to install ibm_db module from a Linux Red Hat 7 server without any internet connection. This server is configured to use Nexus as npm proxy. I have no problem installing any npm package except ibm_db.
As our server does not have internet connection, I downloaded linuxx64_odbc_cli.tar.gz file, put it in a folder lib.
I created a variable named IBM_DB_INSTALLER_URL, like detailed on ibm_db documentation, that contains the path to lib folder.
Installer successfully retrieves the driver but failed after when trying to connect another server. Please find below the full error.

Thanks in advance for your help.

Vincent

``> ibm_db@2.2.1 install /opt/myApp/node_modules/ibm_db

node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from /opt/lib/linuxx64_odbc_cli.tar.gz...


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 undefined 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 and extraction of DB2 ODBC CLI Driver completed successfully ...

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443
gyp ERR! stack at Object.exports._errnoException (util.js:1022:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:1045:20)
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
gyp ERR! System Linux 3.10.0-862.3.3.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=/opt/myApp/node_modules/ibm_db/installer/clidriver"
gyp ERR! cwd /opt/myApp/node_modules/ibm_db
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

killed: false,
code: 1,
signal: null,
cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"' }``

@bimalkjha
Copy link
Member

@vincenthodicq Please use below steps:

tar xzf linuxx64_odbc_cli.tar.gz
export IBM_DB_INSTALLER_URL=
export IBM_DB_HOME=<full_path_to_clidriver_folder>
npm install ibm_db

Thanks.

@vincenthodicq
Copy link
Author

Hi Bimal,

I did all the steps that you detailed but same error:

ibm_db@2.2.1 install /opt/myApp/node_modules/ibm_db
node installer/driverInstall.js

IBM_DB_HOME environment variable have already been set to -> /opt/lib/clidriver/

Downloading of clidriver skipped - build is in progress...

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false >--IBM_DB_HOME="$IBM_DB_HOME"
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443
gyp ERR! stack at Object.exports._errnoException (util.js:1022:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:1045:20)
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
gyp ERR! System Linux 3.10.0-862.3.3.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=/opt/lib/clidriver/"
gyp ERR! cwd /opt/myApp/node_modules/ibm_db
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
killed: false,
code: 1,
signal: null,
cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' >}
npm WARN slia@ No description
npm WARN slia@ No repository field.
npm WARN slia@ No license field.

@bimalkjha
Copy link
Member

@vincenthodicq Your installation fails due to this error: ETIMEDOUT 104.20.23.46:443. Your system is unable to connect to 104.20.23.46 which is the IP Address for nodejs.org. If you look on error carefully, it is the node-gyp package that fails with error. node-gyp is used by ibm_db to compile node.js add-on code.
I checked node-gyp repository on github and found many issues pointing that node-gyp do not work without internet. Please check this issue.
@bnoordhuis Any thought here?

@vincenthodicq
Copy link
Author

Thanks @bimalkjha for your answer.

I looked at the issue that you linked and I tried adding nodedir as an argument to npm install. I do not have anymore an issue with a timeout but with a file that is not existing:

npm install --nodedir=/var/lib/node

ibm_db@2.2.1 install /opt/myApp/node_modules/ibm_db
node installer/driverInstall.js

IBM_DB_HOME environment variable have already been set to -> /opt/lib/clidriver/

Downloading of clidriver skipped - build is in progress...

make: Entering directory /opt/myApp/node_modules/ibm_db/build' CXX(target) Release/obj.target/odbc_bindings/src/odbc.o make: Leaving directory /opt/myApp/node_modules/ibm_db/build'

{ Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"
../src/odbc.cpp:19:16: fatal error: v8.h: No such file or directory
#include <v8.h>
^
compilation terminated.
make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.10.0-862.3.3.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=/opt/lib/clidriver/"
gyp ERR! cwd /opt/myApp/node_modules/ibm_db
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

killed: false,
code: 1,
signal: null,
cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' }

@bimalkjha
Copy link
Member

@vincenthodicq The error says that there is no node.js header files under /var/lib/node directory. Actually, node-gyp requires internet connection to download the v8 header files. We can use --nodedir option if header files are already downloaded previously. Please check this comment that should help you. Thanks.

@bimalkjha
Copy link
Member

Closing issue as links with solution already provided. Also, its node-gyp issue not ibm_db. ibm_db is just dependent on node-gyp module. Thanks.

@vincenthodicq
Copy link
Author

vincenthodicq commented Jul 12, 2018

Hi @bimalkjha ,

sorry for the non update from my side. The comment that you provided was useful. Everything works now.

Regards

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