我在OpenShift平台上部署应用程序时遇到问题 似乎它的bcrypt失败了,但似乎所有东西似乎都正确安装 我担心我会使用每个节点模块遇到同样的问题 我认为可能是,问题在于节点模块的版本。
我仍然不知道。我希望有人能帮助我找出正在发生的事情 我复制了我的整个jenkins控制台输出(请注意,我在OpenShift服务器上的第一次git推送后输出完全相同)。
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://mySshPrivateId@nodejs-caty.rhcloud.com/~/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'\'''
+ upstream_ssh=mySshPrivateId@nodejs-caty.rhcloud.com
+ 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 'mySshPrivateId@nodejs-caty.rhcloud.com:$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 'mySshPrivateId@nodejs-caty.rhcloud.com:$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 npm@1.2.17 npm info using node@v0.10.5 npm info preinstall Caty@0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo npm info linkStuff Caty@0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/csrf npm info preinstall csrf@0.0.3 npm info linkStuff csrf@0.0.3 npm info install csrf@0.0.3 npm info postinstall csrf@0.0.3 npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/session-mongoose npm info preinstall session-mongoose@0.4.1 npm info linkStuff session-mongoose@0.4.1 npm info install session-mongoose@0.4.1 npm info postinstall session-mongoose@0.4.1 npm info install Caty@0.0.1a npm info postinstall Caty@0.0.1a npm info prepublish Caty@0.0.1a npm info ok
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId@nodejs-caty.rhcloud.com '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 mySshPrivateId@nodejs-caty.rhcloud.com '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 mySshPrivateId@nodejs-caty.rhcloud.com: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/ mySshPrivateId@nodejs-caty.rhcloud.com: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/ mySshPrivateId@nodejs-caty.rhcloud.com: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/ mySshPrivateId@nodejs-caty.rhcloud.com:app-root/runtime/dependencies/
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId@nodejs-caty.rhcloud.com '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
关于版本的提取引用:
使用npm@1.2.17 npm info使用node@v0.10.5
我的应用程序依赖项列表:
"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"
},
提前感谢任何勇敢冒险进入这一组信息的人。 :)
答案 0 :(得分:0)
我遇到了同样的问题,我怀疑因为我正在使用mac,所以它与OSX bcrypt编译问题有关,该问题描述为here。 我试图删除node_modules目录,让OpenShift运行npm并再次下载依赖项,但由于某些原因,这对我不起作用。
我最终创建了一个新的应用程序并提交了我的存储库,同时排除了解决了我的问题的node_module文件夹。