nodejs-custom-version-openshift
nodejs-custom-version-openshift copied to clipboard
The initial build for the application failed - returned an error. rc=255
I have been trying to install this cartridge twice on Openshift, but I am getting the following error message:
Disclaimer: This is an experimental cartridge that provides a way to try unsupported languages, frameworks, and middleware on OpenShift.
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 5680327d0c1e668b49000222 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c5,c768' /bin/sh -c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=255
.Last 10 kB of build output:
Stopping DIY cartridge
Repairing links for 1 deployments
Building git ref 'master', commit e0fc834
- Checking to see if Node.js version 4.2.3 is installed ...
- Downloading and extracting http://nodejs.org/dist/v4.2.3/node-v4.2.3-linux-x64.tar.gz ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 11.1M 100 11.1M 0 0 47.1M 0 --:--:-- --:--:-- --:--:-- 48.6M
- Done installing Node.js version 4.2.3
/var/lib/openshift/5680327d0c1e668b49000222/app-root/runtime/repo//.openshift/lib/utils: line 97: /var/lib/openshift/5680327d0c1e668b49000222//nodejs/configuration/node.env: No such file or directory
- Added source setup_custom_nodejs_env to .bash_profile
- PATH set to include custom node version (4.2.3) from
/var/lib/openshift/5680327d0c1e668b49000222/app-root/data//node-v4.2.3-linux-x64/bin
PATH = /var/lib/openshift/5680327d0c1e668b49000222/app-root/data//node-v4.2.3-linux-x64/bin:/bin:/usr/bin:/usr/sbin
- Installing dependencies w/ new version of npm ...
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 attempt registry request try #1 at 1:50:02 PM
npm http request GET https://registry.npmjs.org/express
npm http 200 https://registry.npmjs.org/express
npm info retry fetch attempt 1 at 1:50:03 PM
npm info attempt registry request try #1 at 1:50:03 PM
npm http fetch GET https://registry.npmjs.org/express/-/express-4.13.3.tgz
npm http fetch 200 https://registry.npmjs.org/express/-/express-4.13.3.tgz
npm ERR! Linux 2.6.32-573.12.1.el6.x86_64
npm ERR! argv "/var/lib/openshift/5680327d0c1e668b49000222/app-root/data/node-v4.2.3-linux-x64/bin/node" "/var/lib/openshift/5680327d0c1e668b49000222/app-root/data/node-v4.2.3-linux-x64/bin/npm" "install" "-d"
npm ERR! node v4.2.3
npm ERR! npm v2.14.7
npm ERR! path /var/lib/openshift/5680327d0c1e668b49000222/.npm
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/var/lib/openshift/5680327d0c1e668b49000222/.npm'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/var/lib/openshift/5680327d0c1e668b49000222/.npm']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/var/lib/openshift/5680327d0c1e668b49000222/.npm',
npm ERR! parent: 'nodejs-Custom-Version-Sample' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /var/lib/openshift/5680327d0c1e668b49000222/app-root/runtime/repo/npm-debug.log
An error occurred executing 'gear postreceive' (exit code: 243)
Error message: CLIENT_ERROR: Failed to execute action hook 'build' for 5680327d0c1e668b49000222 application chartvibes
For more details about the problem, try running the command again with the '--trace' option.
Can you take a look at it?
@JVerstry that's failing because the .npm directory is not created / writeable.
Rather than starting with a DIY app/cartridge as a base, use the nodejs-0.10 app instead.
Example:
rhc app create -a zapp -t nodejs-0.10
cd zapp
git remote add upstream -m master git://github.com/ramr/nodejs-custom-version-openshift.git
git pull -s recursive -X theirs upstream master
echo 4.2.3 >> .openshift/markers/NODEJS_VERSION
git push
That should do it.
Didn't hear back, so closing this out.