1

I'm having trouble deploying my application on the OpenShift platform.
It seems like it's bcrypt that fails but everything also seems to install properly.
I'm afraid I'll be having same trouble with every node module I wanna use.
I thought that may be, the problem is with the version of the node module.

Still I have no clue. I hope someone could help me find out what's going on.
I copy bellow my entire jenkins console output (note that I had the exact same output after my first git push on the OpenShift server).

Started by user Jenkins Admin Building remotely on nodejsbldr in workspace /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.Channel@129c587:nodejsbldr Using strategy: Default Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.LocalChannel@d1cdcd Wiping out workspace first. Cloning the remote Git repository Cloning repository origin Fetching upstream changes from ssh://[email protected]/~/git/nodejs.git Seen branch in repository origin/HEAD Seen branch in repository origin/alpha Seen branch in repository origin/master Commencing build of Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) Checking out Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) No change to record in branch origin/alpha [repo] $ /bin/sh -xe /tmp/hudson154161094843280943.sh
+ source /usr/lib/openshift/cartridge_sdk/bash/sdk
++ '[' false == true ']'
++ OO_BASH_SDK=true
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh'\'''
+ [email protected]
+ rm -f /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json
+ marker_present force_clean_build
+ '[' -f /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo//.openshift/markers/force_clean_build ']'
+ set +e
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh '[email protected]:$OPENSHIFT_BUILD_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh '[email protected]:$OPENSHIFT_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/
+ set -e
+ gear build Building git ref 'origin/alpha', commit 26cbed2 Building NodeJS cartridge npm info it worked if it ends with ok npm info using [email protected] npm info using [email protected] npm info preinstall [email protected] npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo npm info linkStuff [email protected] npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/csrf npm info preinstall [email protected] npm info linkStuff [email protected] npm info install [email protected] npm info postinstall [email protected] npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/session-mongoose npm info preinstall [email protected] npm info linkStuff [email protected] npm info install [email protected] npm info postinstall [email protected] npm info install [email protected] npm info postinstall [email protected] npm info prepublish [email protected] npm info ok 
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh [email protected] 'gear stop --conditional
--exclude-web-proxy --git-ref gtiRefNum' Stopping gear... Stopping MongoDB cartridge Stopping NodeJS cartridge
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh [email protected] 'gear create-deployment-dir'
+ deployment_dir=2014-03-12_22-42-14.111
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json [email protected]:app-deployments/2014-03-12_22-42-14.111/metadata.json
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh
--exclude .git /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/ [email protected]:app-root/runtime/repo/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/ [email protected]:app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/ [email protected]:app-root/runtime/dependencies/
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh [email protected] 'gear remotedeploy
--deployment-datetime 2014-03-12_22-42-14.111' Preparing build for deployment Deployment id is aa14cca3 Activating deployment Starting MongoDB cartridge Starting NodeJS cartridge

DEBUG: Running node-supervisor with DEBUG:   program 'app.js' DEBUG:  
--watch '.' DEBUG:   --ignore 'undefined' DEBUG:   --extensions 'node|js|coffee' DEBUG:   --exec 'node'

DEBUG: Starting child process with 'node app.js' DEBUG: Watching directory '/var/lib/openshift/mySshPrivateId/app-root/runtime/repo' for changes. Failed to load c++ bson extension, using pure JS version

/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:79
        throw e
              ^ Error: /var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at bindings (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/bcrypt.js:1:97)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12) DEBUG: Program node app.js exited with code 8

DEBUG: Starting child process with 'node app.js' Archiving artifacts Finished: SUCCESS

The extracted quote about the versions :

using [email protected] npm info using [email protected]

And my application dependencies list :

"dependencies": {
  "express": "3.4.8",
  "jade": "1.1.5",
  "socket.io": "0.9.16",
  "bcrypt": "0.7.7",
  "colors": "0.6.2",
  "connect": "2.13.0",
  "connect-mongo": "0.4.0",
  "cookie": "0.1.1",
  "mongodb": "1.3.23",
  "mongoose": "3.8.6"
},

Thanks in advance for anyone brave enough to risk his self into that bunch of infos. :)

rmNyro
  • 351
  • 2
  • 14

1 Answers1

0

I've had the same problem, I suspect that since I am working on a mac it is related to the OSX bcrypt compilation issue that is described here.
I have tried to remove the node_modules directory and let OpenShift run npm and download the dependencies again but for some reason that did not work for me.

I have ended up creating a new application and committing my repository while excluding the node_module folder which solved my problem.

Community
  • 1
  • 1
Nimrod Shory
  • 2,475
  • 2
  • 19
  • 25
  • Hi Nimrod, I'm sorry I didn't noticed your answer. I don't recall what happened but I ended up switching to heroku. Which is a really great provider for small private tests. Thanks anyway ! – rmNyro Sep 29 '15 at 14:42