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

npm install oracledb fails on build machines with restricted network access. #730

Closed
andersjanmyr opened this issue Jul 12, 2017 · 9 comments

Comments

@andersjanmyr
Copy link

andersjanmyr commented Jul 12, 2017

Installation fails when I'm trying to build on a build machine with restricted network access.
I don't know if this is the problem, but the connect ETIMEDOUT 104.20.22.46:443 in the log looks suspicious.

When I build on OSX or in a docker container on my local machine it works fine. I have tested with both Ubuntu and CentOS.

Any help would be appreciated.

  1. What is your version of Node.js? Run examples/version.js to find versions.
    node -v v6.11.0

  2. What version of node-oracledb are you using?
    [email protected]

  3. What is the version of your Oracle client (e.g. Instant Client)? How was it installed? Where it is installed?
    LD_LIBRARY_PATH: /jenkins/workspace/sams-sng-orchestration/tmp/instantclient_12_2_linux
    OCI_INC_DIR: /jenkins/workspace/sams-sng-orchestration/tmp/instantclient_12_2_linux/sdk/include

  4. What is the version of Oracle Database?
    None yet.

  5. What is your OS and version?

  1. What compiler version did you use? For example, with GCC, run gcc --version
  • gcc --version
    gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)
  1. What environment variables did you set? How exactly did you set them?
    export OCI_LIB_DIR=$tmp_dir/instantclient_12_2_linux
    export LD_LIBRARY_PATH=$tmp_dir/instantclient_12_2_linux
    export OCI_INC_DIR=$OCI_LIB_DIR/sdk/include

  2. What exact command caused the problem (e.g. what command did you try to install with)? Who were you logged in as?
    Default build user with correct permissions.

  3. What error(s) you are seeing?

> [email protected] install /jenkins/workspace/sams-sng-orchestration/node_modules/oracledb
21:36:13 > node-gyp rebuild
21:36:13 
21:38:21 gyp WARN install got an error, rolling back install
21:38:21 gyp ERR! configure error 
21:38:21 gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:443
21:38:21 gyp ERR! stack     at Object.exports._errnoException (util.js:1018:11)
21:38:21 gyp ERR! stack     at exports._exceptionWithHostPort (util.js:1041:20)
21:38:21 gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
21:38:21 gyp ERR! System Linux 3.10.0-514.10.2.el7.x86_64
21:38:21 gyp ERR! command "/jenkins/localtools/sams-sng-orchestration-60/nodejs/bin/node" "/jenkins/localtools/sams-sng-orchestration-60/npm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
21:38:21 gyp ERR! cwd /jenkins/workspace/sams-sng-orchestration/node_modules/oracledb
21:38:21 gyp ERR! node -v v6.11.0
21:38:21 gyp ERR! node-gyp -v v3.6.2
21:38:21 gyp ERR! not ok 
21:38:22 npm ERR! code ELIFECYCLE
21:38:22 npm ERR! errno 1
21:38:22 npm ERR! [email protected] install: `node-gyp rebuild`
21:38:22 npm ERR! Exit status 1
21:38:22 npm ERR! 
21:38:22 npm ERR! Failed at the [email protected] install script.

Here's a gist with the npm-debug.log, https://gist.github.com/andersjanmyr/77a8f8e8e83de07da9f5d11bc7e8120a

@cjbj
Copy link
Member

cjbj commented Jul 12, 2017

Yes connect ETIMEDOUT 104.20.22.46:443 will be a site issue that you need to resolve. How restricted are you? Have you set http_proxy (and/or https_proxy that npm 5 seems to need). Alternatively build on a less restrictive machine and copy the node_modules/oracledb dir over.

@andersjanmyr
Copy link
Author

@cjbj Thanks for the reply, but why does it need to go outside the machine to build the driver? Does it download something? If it does, can I add it manually?

@cjbj
Copy link
Member

cjbj commented Jul 13, 2017

@andersjanmyr for a start, node-oracledb has a dependency on NAN. Npm may do other book keeping, such as checking versions. You could strace or netstat or whatever to see what it is doing?

@telkomops
Copy link

set http_proxy=http://uname:password@proxy:proxyport should resolve the issue

@andersjanmyr
Copy link
Author

@telkomops Thanks for trying, but this doesn't work. There is no access allowed outside to untrusted servers. The only access allowed is our local npm repository.

@sagiegurari
Copy link

does that local npm registry machine has access to web? can it proxy those calls?

@cjbj
Copy link
Member

cjbj commented Aug 21, 2017

I'm going to close this - you'll need to work out your own network limitations and download and compile somehow that suits your configuration. Note the recent update in #18: binaries will probably be on GitHub.

@cjbj cjbj closed this as completed Aug 21, 2017
@andersjanmyr
Copy link
Author

Sure, I'm fine with that. I solved it by installing it on a similar machine and copying the files before npm installing.

@cjbj
Copy link
Member

cjbj commented Aug 21, 2017

That seems logical.

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

No branches or pull requests

4 participants