MineMeld Install on CentOS 7 with Ansible: NPM Issue

L1 Bithead

MineMeld Install on CentOS 7 with Ansible: NPM Issue

Hi All, 

 

Install of MM on CentOS 7 (via Ansible playbook) is failing during the step "minemeld : npm install" with a an error around the node-sass package. the verbose outbout from npm-debug.log is below. I've tried a few different things including installing this with Node versions 6, 7, and 8 and can never seen to get this step to work. 

 

Thoughts?

 

q18252 verbose linkStuff   false,
18252 verbose linkStuff   '/opt/minemeld/www/webui/node_modules/gulp-sass/node_modules' ]
18253 info linkStuff node-sass@3.13.1
18254 verbose linkBins node-sass@3.13.1
18255 verbose link bins [ { 'node-sass': 'bin/node-sass' },
18255 verbose link bins   '/opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin',
18255 verbose link bins   false ]
18256 verbose linkMans node-sass@3.13.1
18257 verbose rebuildBundles node-sass@3.13.1
18258 verbose rebuildBundles [ '.bin',
18258 verbose rebuildBundles   'async-foreach',
18258 verbose rebuildBundles   'cross-spawn',
18258 verbose rebuildBundles   'gaze',
18258 verbose rebuildBundles   'get-stdin',
18258 verbose rebuildBundles   'glob',
18258 verbose rebuildBundles   'in-publish',
18258 verbose rebuildBundles   'lodash.assign',
18258 verbose rebuildBundles   'lodash.clonedeep',
18258 verbose rebuildBundles   'meow',
18258 verbose rebuildBundles   'mkdirp',
18258 verbose rebuildBundles   'nan',
18258 verbose rebuildBundles   'node-gyp',
18258 verbose rebuildBundles   'npmlog',
18258 verbose rebuildBundles   'request',
18258 verbose rebuildBundles   'sass-graph' ]
18259 silly gentlyRm /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass is being purged
18260 verbose gentlyRm don't care about contents; nuking /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass
18261 info install node-sass@3.13.1
18262 verbose unsafe-perm in lifecycle false
18263 info node-sass@3.13.1 Failed to exec install script
18264 verbose unlock done using /root/.npm/_locks/node-sass-2ebd5b72c6bc32b8.lock for /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/nod$
18265 verbose about to build /opt/minemeld/www/webui/node_modules/gulp-sass
18266 verbose unlock done using /root/.npm/_locks/gulp-sass-6e2249fc9ca5138f.lock for /opt/minemeld/www/webui/node_modules/gulp-sass
18267 verbose stack Error: node-sass@3.13.1 install: `node scripts/install.js`
18267 verbose stack Exit status 1
18267 verbose stack     at EventEmitter.<anonymous> (/opt/minemeld/www/venv/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
18267 verbose stack     at EventEmitter.emit (events.js:110:17)
18267 verbose stack     at ChildProcess.<anonymous> (/opt/minemeld/www/venv/lib/node_modules/npm/lib/utils/spawn.js:14:12)
18267 verbose stack     at ChildProcess.emit (events.js:110:17)
18267 verbose stack     at maybeClose (child_process.js:1015:16)
18267 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
18268 verbose pkgid node-sass@3.13.1
18269 verbose cwd /opt/minemeld/www/webui
18270 error Linux 3.10.0-693.2.2.el7.x86_64
18271 error argv "/opt/minemeld/www/venv/bin/node" "/opt/minemeld/www/venv/bin/npm" "install"
18272 error node v0.12.2
18273 error npm  v2.7.4
18274 error code ELIFECYCLE
18275 error node-sass@3.13.1 install: `node scripts/install.js`
18275 error Exit status 1
18276 error Failed at the node-sass@3.13.1 install script 'node scripts/install.js'.
18276 error This is most likely a problem with the node-sass package,
18276 error not with npm itself.
18276 error Tell the author that this fails on your system:
18276 error     node scripts/install.js
18276 error You can get their info via:
18276 error     npm owner ls node-sass
18276 error There is likely additional logging output above.
18277 verbose exit [ 1, true ]
18278 verbose unbuild node_modules/gulp-sass/node_modules/node-sass
18279 info preuninstall node-sass@3.13.1
18280 info uninstall node-sass@3.13.1
18281 verbose unbuild rmStuff node-sass@3.13.1 from /opt/minemeld/www/webui/node_modules
18282 verbose unbuild rmStuff in /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules
18283 silly gentlyRm /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass is being gently removed
18284 silly gentlyRm verifying /opt/minemeld/www/webui is an npm working directory
18285 silly gentlyRm containing path /opt/minemeld/www/webui is under npm's control, in /opt/minemeld/www/webui
18286 silly gentlyRm deletion target /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass is under /opt/minemeld/www/webui
18287 verbose gentlyRm vacuuming from /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass up to /opt/minemeld/www/webui
18288 silly vacuum-fs removing /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass
18289 silly vacuum-fs removing /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin
18290 silly vacuum-fs quitting because other entries in /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules
18291 info postuninstall node-sass@3.13.1
18292 silly gentlyRm /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/node-sass is being purged from base /opt/minemeld/www/webui
18293 verbose gentlyRm don't care about contents; nuking /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/node-sass
18294 silly vacuum-fs purging /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/node-sass
18295 silly vacuum-fs quitting because other entries in /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules
18296 verbose unbuild node_modules/gulp-sass
18297 info preuninstall gulp-sass@2.0.4
18298 info uninstall gulp-sass@2.0.4
18299 verbose unbuild rmStuff gulp-sass@2.0.4 from /opt/minemeld/www/webui/node_modules
18300 info postuninstall gulp-sass@2.0.4
18301 silly gentlyRm /opt/minemeld/www/webui/node_modules/gulp-sass is being purged from base /opt/minemeld/www/webui
18302 verbose gentlyRm don't care about contents; nuking /opt/minemeld/www/webui/node_modules/gulp-sass
18303 silly vacuum-fs purging /opt/minemeld/www/webui/node_modules/gulp-sass
18304 silly vacuum-fs quitting because other entries in /opt/minemeld/www/webui/node_modules
Tags (2)
L7 Applicator

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

Hi @phorbalrrd,

thanks for reporting this !

I have just updated the minemeld-ansible playbook to fix this, could you give it a try ?

 

Thanks,

luigi

L1 Bithead

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

Thank you very much for the quick response. I re-cloned the git repo but it's still failing (output below). A couple other thoughts: Is there something I need to clean up from original run (i.e remove any directories or anything like that?)

 

Also Node is currently at v6.11.4 , is there a different version that I should be using?

 

 

18259 verbose linkMans node-sass@3.13.1
18260 verbose rebuildBundles node-sass@3.13.1
18261 verbose rebuildBundles [ '.bin',
18261 verbose rebuildBundles   'async-foreach',
18261 verbose rebuildBundles   'cross-spawn',
18261 verbose rebuildBundles   'gaze',
18261 verbose rebuildBundles   'get-stdin',
18261 verbose rebuildBundles   'glob',
18261 verbose rebuildBundles   'in-publish',
18261 verbose rebuildBundles   'lodash.assign',
18261 verbose rebuildBundles   'lodash.clonedeep',
18261 verbose rebuildBundles   'meow',
18261 verbose rebuildBundles   'mkdirp',
18261 verbose rebuildBundles   'nan',
18261 verbose rebuildBundles   'node-gyp',
18261 verbose rebuildBundles   'npmlog',
18261 verbose rebuildBundles   'request',
18261 verbose rebuildBundles   'sass-graph' ]
18262 silly gentlyRm /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass is being purged
18263 verbose gentlyRm don't care about contents; nuking /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/.bin/node-sass
18264 info install node-sass@3.13.1
18265 verbose unsafe-perm in lifecycle false
18266 info node-sass@3.13.1 Failed to exec install script
18267 verbose unlock done using /root/.npm/_locks/node-sass-2ebd5b72c6bc32b8.lock for /opt/minemeld/www/webui/node_modules/gulp-sass/node_modules/node-sass
18268 verbose about to build /opt/minemeld/www/webui/node_modules/gulp-sass
18269 verbose unlock done using /root/.npm/_locks/gulp-sass-6e2249fc9ca5138f.lock for /opt/minemeld/www/webui/node_modules/gulp-sass
18270 verbose stack Error: node-sass@3.13.1 install: `node scripts/install.js`
18270 verbose stack Exit status 1
18270 verbose stack     at EventEmitter.<anonymous> (/opt/minemeld/www/venv/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
18270 verbose stack     at EventEmitter.emit (events.js:110:17)
18270 verbose stack     at ChildProcess.<anonymous> (/opt/minemeld/www/venv/lib/node_modules/npm/lib/utils/spawn.js:14:12)
18270 verbose stack     at ChildProcess.emit (events.js:110:17)
18270 verbose stack     at maybeClose (child_process.js:1015:16)
18270 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
18271 verbose pkgid node-sass@3.13.1
18272 verbose cwd /opt/minemeld/www/webui
18273 error Linux 3.10.0-693.2.2.el7.x86_64
18274 error argv "/opt/minemeld/www/venv/bin/node" "/opt/minemeld/www/venv/bin/npm" "install"
18275 error node v0.12.2
18276 error npm  v2.7.4
18277 error code ELIFECYCLE
18278 error node-sass@3.13.1 install: `node scripts/install.js`
18278 error Exit status 1
18279 error Failed at the node-sass@3.13.1 install script 'node scripts/install.js'.
18279 error This is most likely a problem with the node-sass package,
18279 error not with npm itself.
18279 error Tell the author that this fails on your system:
18279 error     node scripts/install.js
18279 error You can get their info via:
18279 error     npm owner ls node-sass
18279 error There is likely additional logging output above.
18280 verbose exit [ 1, true ]
L7 Applicator

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

Hi @phorbalrrd,

please, start from scratch - just do a "sudo rm -rf /opt/minemeld" and rerun the playbook. This to make sure that all the repos are in order, and to remove the old node virtualenv with the old version of node (MineMeld does not use the system node executable).

 

Thanks,

luigi

L1 Bithead

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

That did it!

 

minemeld-engine                  RUNNING   pid 5885, uptime 0:00:42
minemeld-supervisord-listener    RUNNING   pid 5884, uptime 0:00:42
minemeld-traced                  RUNNING   pid 5886, uptime 0:00:42
minemeld-web                     RUNNING   pid 5887, uptime 0:00:42

 

Out of curiosity, could you explain what the issue was with the NPM install?

L7 Applicator

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

Sure:

- the ansible playbook was installing an old version of node (0.12.2), different from the release we use for building MM (4.2.6)

- a recent update in one of the packages used for building the frontend UI broke the compatibility with that old version

- the fix has been updating the playbook to make it consistent with our building infrastructure

 

 

L7 Applicator

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

Hi @phorbalrrd,

just two additional notes:

- I have just pushed an additional commit to the playbook to improve the shutdown behavior of systemd. See here:

https://github.com/PaloAltoNetworks/minemeld-ansible/blob/master/roles/minemeld/templates/minemeld.c...

- make sure RabbitMQ is running ok, I have seen some weird issues of RabbitMQ on Centos 7 and RHEL 7 and I still have to isolate the problem.

 

Thanks again,

luigi

L0 Member

Re: MineMeld Install on CentOS 7 with Ansible: NPM Issue

This is still an applicable fix for issues with NPM install using Ansible on CentOS 7. I ran the rm command for the first install and re-ran the playbook for a successful install.

 

Thanks

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!