Support Questions
Find answers, ask questions, and share your expertise

Metron 0.4.1 build failure - metron-config: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm

New Contributor

Hello,

I'm trying to build Metron 0.4.1 by following this guide , but the build is failing at metron-config.

Using CentOS 7

[ERROR]
[ERROR] npm ERR! Linux 3.10.0-693.5.2.el7.x86_64
[ERROR] npm ERR! argv "/root/metron/metron-interface/metron-config/node/node" "/root/metron/metron-interface/metron-config/node/node_modules/npm/bin/npm-cli.js" "run" "build"
[ERROR] npm ERR! node v6.2.0
[ERROR] npm ERR! npm  v3.8.9
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! metron-management-ui@0.4.2 build: `./node_modules/angular-cli/bin/ng build -prod`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the metron-management-ui@0.4.2 build script './node_modules/angular-cli/bin/ng build -prod'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[ERROR] npm ERR! If you do, this is most likely a problem with the metron-management-ui package,
[ERROR] npm ERR! not with npm itself.
[ERROR] npm ERR! Tell the author that this fails on your system:
[ERROR] npm ERR!     ./node_modules/angular-cli/bin/ng build -prod
[ERROR] npm ERR! You can get information on how to open an issue for this project with:
[ERROR] npm ERR!     npm bugs metron-management-ui
[ERROR] npm ERR! Or if that isn't available, you can get their info via:
[ERROR] npm ERR!     npm owner ls metron-management-ui
[ERROR] npm ERR! There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR! Please include the following file with any support request:
[ERROR] npm ERR!     /root/metron/metron-interface/metron-config/npm-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Metron ............................................. SUCCESS [  1.163 s]
[INFO] metron-stellar ..................................... SUCCESS [  0.325 s]
[INFO] stellar-common ..................................... SUCCESS [01:02 min]
[INFO] metron-analytics ................................... SUCCESS [  0.325 s]
[INFO] metron-maas-common ................................. SUCCESS [  1.278 s]
[INFO] metron-platform .................................... SUCCESS [  0.326 s]
[INFO] metron-zookeeper ................................... SUCCESS [ 10.081 s]
[INFO] metron-test-utilities .............................. SUCCESS [ 28.300 s]
[INFO] metron-integration-test ............................ SUCCESS [ 20.376 s]
[INFO] metron-maas-service ................................ SUCCESS [  4.585 s]
[INFO] metron-common ...................................... SUCCESS [ 26.411 s]
[INFO] metron-statistics .................................. SUCCESS [ 46.557 s]
[INFO] metron-writer ...................................... SUCCESS [ 50.212 s]
[INFO] metron-storm-kafka-override ........................ SUCCESS [  1.088 s]
[INFO] metron-storm-kafka ................................. SUCCESS [  0.555 s]
[INFO] metron-hbase ....................................... SUCCESS [  4.574 s]
[INFO] metron-profiler-common ............................. SUCCESS [  1.461 s]
[INFO] metron-profiler-client ............................. SUCCESS [ 51.837 s]
[INFO] metron-profiler .................................... SUCCESS [02:06 min]
[INFO] metron-hbase-client ................................ SUCCESS [ 22.704 s]
[INFO] metron-enrichment .................................. SUCCESS [02:06 min]
[INFO] metron-indexing .................................... SUCCESS [01:21 min]
[INFO] metron-solr ........................................ SUCCESS [01:39 min]
[INFO] metron-pcap ........................................ SUCCESS [  2.099 s]
[INFO] metron-parsers ..................................... SUCCESS [03:01 min]
[INFO] metron-pcap-backend ................................ SUCCESS [01:22 min]
[INFO] metron-data-management ............................. SUCCESS [03:28 min]
[INFO] metron-api ......................................... SUCCESS [01:24 min]
[INFO] metron-management .................................. SUCCESS [ 22.118 s]
[INFO] elasticsearch-shaded ............................... SUCCESS [ 22.134 s]
[INFO] metron-elasticsearch ............................... SUCCESS [02:33 min]
[INFO] metron-deployment .................................. SUCCESS [  0.021 s]
[INFO] Metron Ambari Management Pack ...................... SUCCESS [  9.834 s]
[INFO] metron-contrib ..................................... SUCCESS [  0.323 s]
[INFO] metron-docker ...................................... SUCCESS [ 10.367 s]
[INFO] metron-interface ................................... SUCCESS [  0.325 s]
[INFO] metron-config ...................................... FAILURE [09:06 min]
[INFO] metron-alerts ...................................... SUCCESS [07:26 min]
[INFO] metron-rest-client ................................. SUCCESS [ 23.412 s]
[INFO] metron-rest ........................................ SKIPPED
[INFO] site-book .......................................... SUCCESS [  2.825 s]
[INFO] 3rd party Functions (just for tests) ............... SUCCESS [  0.648 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:07 min (Wall Clock)
[INFO] Finished at: 2017-11-25T20:43:53-05:00
[INFO] Final Memory: 308M/690M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (ng build) on project metron-config: Failed to run task: 'npm run build' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :metron-config

Anybody have any ideas on how to fix it?

1 ACCEPTED SOLUTION

Explorer

We are using a Maven plugin that installs specific versions of node and npm locally so I don't think that is it (everyone uses the same version).

We have seen build errors before that are related to the C++ compiler version (https://issues.apache.org/jira/browse/METRON-1265). I would try that first. If that doesn't resolve it, we'll need more information from the build logs. Hard to tell what the cause is from what was posted.

View solution in original post

13 REPLIES 13

Super Mentor

@James Hendrick

Can you please try with bit more newer version of nodejs/npm, as we see the error begin with:

[ERROR] npm ERR! node v6.2.0
[ERROR] npm ERR! npm  v3.8.9
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! metron-management-ui@0.4.2 build: `./node_modules/angular-cli/bin/ng build -prod`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the metron-management-ui@0.4.2 build script './node_modules/angular-cli/bin/ng build -prod'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
.

nodejs v6.9+ nodejs can be installed on quick dev with

curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - && yum install -y nodejs

.

Super Collaborator

@James Hendrick, I have been able to get Metron working with the following versions of npm and node:

➜  ~ npm --version
5.5.1
➜  ~ node --version
v8.9.1

Can you try with these versions on your setup and see if you are able to get it working?

Explorer

We are using a Maven plugin that installs specific versions of node and npm locally so I don't think that is it (everyone uses the same version).

We have seen build errors before that are related to the C++ compiler version (https://issues.apache.org/jira/browse/METRON-1265). I would try that first. If that doesn't resolve it, we'll need more information from the build logs. Hard to tell what the cause is from what was posted.

Contributor

We are seeing issues when gcc-c++ doesn't support cpp 11, ie gcc-c++ < 4.8

New Contributor

Thanks for all the help. The issue was indeed the C++ compiler. Once I upgraded to 5.3.1 The build completed without any issues.

Here is 2 ways to do it for anybody having the same issue:

sudo yum install centos-release-scl
sudo yum install devtoolset-4-gcc*
scl enable devtoolset-4 bash
which gcc
gcc --version
Installing the latest gcc 7.2.0 from source code:
download file: https://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.gz
compile and install:
//required libraries:
yum install libmpc-devel mpfr-devel gmp-devel

./configure --with-system-zlib --disable-multilib --enable-languages=c,c++

make -j 8

make install<br>

hello i am following the same guide, had the same issue, it is fixed with gcc udpate

i have a new one now 😞

[ERROR] npm ERR! node v6.2.0
[ERROR] npm ERR! npm  v3.8.9
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! metron-management-ui@0.4.1 build: `./node_modules/angular-cli/bin/ng build -prod`
[ERROR] npm ERR! Exit status 1
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the metron-management-ui@0.4.1 build script './node_modules/angular-cli/bin/ng build -prod'.
[ERROR] npm ERR! Make sure you have the latest version of node.js and npm installed.
[ERROR] npm ERR! If you do, this is most likely a problem with the metron-management-ui package,
[ERROR] npm ERR! not with npm itself.
[ERROR] npm ERR! Tell the author that this fails on your system:
[ERROR] npm ERR!     ./node_modules/angular-cli/bin/ng build -prod
[ERROR] npm ERR! You can get information on how to open an issue for this project with:
[ERROR] npm ERR!     npm bugs metron-management-ui
[ERROR] npm ERR! Or if that isn't available, you can get their info via:
[ERROR] npm ERR!     npm owner ls metron-management-ui
[ERROR] npm ERR! There is likely additional logging output above.
[ERROR]
[ERROR] npm ERR! Please include the following file with any support request:
[ERROR] npm ERR!     /files/metron/metron-interface/metron-config/npm-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Metron ............................................. SUCCESS [  0.906 s]
[INFO] metron-stellar ..................................... SUCCESS [  0.778 s]
[INFO] stellar-common ..................................... SUCCESS [ 17.756 s]
[INFO] metron-analytics ................................... SUCCESS [  0.119 s]
[INFO] metron-maas-common ................................. SUCCESS [  1.241 s]
[INFO] metron-platform .................................... SUCCESS [  0.776 s]
[INFO] metron-test-utilities .............................. SUCCESS [  7.836 s]
[INFO] metron-integration-test ............................ SUCCESS [  7.076 s]
[INFO] metron-maas-service ................................ SUCCESS [  4.256 s]
[INFO] metron-common ...................................... SUCCESS [ 16.107 s]
[INFO] metron-statistics .................................. SUCCESS [ 21.441 s]
[INFO] metron-writer ...................................... SUCCESS [ 21.390 s]
[INFO] metron-storm-kafka-override ........................ SUCCESS [  0.456 s]
[INFO] metron-storm-kafka ................................. SUCCESS [  0.893 s]
[INFO] metron-hbase ....................................... SUCCESS [  3.917 s]
[INFO] metron-profiler-common ............................. SUCCESS [  0.738 s]
[INFO] metron-profiler-client ............................. SUCCESS [ 20.567 s]
[INFO] metron-profiler .................................... SUCCESS [ 53.493 s]
[INFO] metron-hbase-client ................................ SUCCESS [ 12.171 s]
[INFO] metron-enrichment .................................. SUCCESS [ 56.167 s]
[INFO] metron-indexing .................................... SKIPPED
[INFO] metron-solr ........................................ SKIPPED
[INFO] metron-pcap ........................................ SUCCESS [  1.024 s]
[INFO] metron-parsers ..................................... SKIPPED
[INFO] metron-pcap-backend ................................ SUCCESS [ 33.102 s]
[INFO] metron-data-management ............................. SKIPPED
[INFO] metron-api ......................................... SUCCESS [ 30.190 s]
[INFO] metron-management .................................. SKIPPED
[INFO] elasticsearch-shaded ............................... SUCCESS [ 10.245 s]
[INFO] metron-elasticsearch ............................... SKIPPED
[INFO] metron-deployment .................................. SUCCESS [  0.004 s]
[INFO] Metron Ambari Management Pack ...................... SUCCESS [  3.798 s]
[INFO] metron-contrib ..................................... SUCCESS [  0.006 s]
[INFO] metron-docker ...................................... SUCCESS [  3.957 s]
[INFO] metron-interface ................................... SUCCESS [  0.114 s]
[INFO] metron-config ...................................... FAILURE [02:12 min]
[INFO] metron-alerts ...................................... SUCCESS [02:00 min]
[INFO] metron-rest-client ................................. SUCCESS [  0.429 s]
[INFO] metron-rest ........................................ SKIPPED
[INFO] site-book .......................................... SUCCESS [  0.888 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:13 min (Wall Clock)
[INFO] Finished at: 2017-12-08T11:12:28+00:00
[INFO] Final Memory: 176M/3097M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (ng build) on project metron-config: Failed to run task: 'npm run build' failed. (error code 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :metron-config

one thing to note is i updated node and npm

[root@dmetron01 metron]# npm --version
3.10.10
[root@dmetron01 metron]# node --version
v6.12.1

any ideas ?

thanks

Explorer
When you say you updated gcc at it fixed it, what do you mean? Did you successfully build at one point but now it's failing again? Either way that log statement doesn't tell us much other than which module failed. We would need to look at the full log to see what the root cause is.

Yeap you are right now re-reading it doesnt explain much 😕

the first error i had was an issue with node-gyp, but he below fixed that

pm install npm@latest -g
npm install -g node-gyp

the other thing is metron seems to have its own npm and node in "/files/metron/metron-interface/metron-config/node/" so thats the thing about the version that is being shown.

my current issue is (googled it a few hours cant fix it 😞

[INFO] Cannot find module 'tough-cookie'
Downloading: https://raw.github.com/benelog/multiline/master/maven-repository/com/sun/jersey/jersey-core/1.19/jer...
[INFO] Error: Cannot find module 'tough-cookie'
[INFO]     at Function.Module._resolveFilename (module.js:440:15)
[INFO]     at Function.Module._load (module.js:388:25)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Object.<anonymous> (/files/metron/metron-interface/metron-config/node_modules/request/lib/cookies.js:3:13)
[INFO]     at Module._compile (module.js:541:32)
[INFO]     at Object.Module._extensions..js (module.js:550:10)
[INFO]     at Module.load (module.js:458:32)
[INFO]     at tryModuleLoad (module.js:417:12)
[INFO]     at Function.Module._load (module.js:409:3)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Object.<anonymous> (/files/metron/metron-interface/metron-config/node_modules/request/index.js:18:15)
[INFO]     at Module._compile (module.js:541:32)
[INFO]     at Object.Module._extensions..js (module.js:550:10)
[INFO]     at Module.load (module.js:458:32)
[INFO]     at tryModuleLoad (module.js:417:12)
[INFO]     at Function.Module._load (module.js:409:3)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Leek._enqueue (/files/metron/metron-interface/metron-config/node_modules/leek/lib/leek.js:60:30)
[INFO]     at Leek.track (/files/metron/metron-interface/metron-config/node_modules/leek/lib/leek.js:87:15)
[INFO]     at Class.Command.validateAndRun (/files/metron/metron-interface/metron-config/node_modules/angular-cli/lib/models/command.js:119:18)
[INFO]     at /files/metron/metron-interface/metron-config/node_modules/angular-cli/lib/cli/cli.js:86:22
[INFO]     at tryCatch (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:12)
[INFO]     at invokeCallback (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/-internal.js:211:13)
[INFO]     at /files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/then.js:26:14
[INFO]     at flush (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/asap.js:80:5)
[INFO]     at _combinedTickCallback (internal/process/next_tick.js:67:7)
[INFO]     at process._tickCallback (internal/process/next_tick.js:98:9)

thanksnpm-debug.txt

@rmerriman, yeap you are right now re-reading it doesnt explain much 😕

the first error i had was an issue with node-gyp, but he below fixed that

pm install npm@latest -g
npm install -g node-gyp

the other thing is metron seems to have its own npm and node in "/files/metron/metron-interface/metron-config/node/" so thats the thing about the version that is being shown.

my current issue is (googled it a few hours cant fix it 😞

[INFO] Cannot find module 'tough-cookie'
Downloading: https://raw.github.com/benelog/multiline/master/maven-repository/com/sun/jersey/jersey-core/1.19/jer...
[INFO] Error: Cannot find module 'tough-cookie'
[INFO]     at Function.Module._resolveFilename (module.js:440:15)
[INFO]     at Function.Module._load (module.js:388:25)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Object.<anonymous> (/files/metron/metron-interface/metron-config/node_modules/request/lib/cookies.js:3:13)
[INFO]     at Module._compile (module.js:541:32)
[INFO]     at Object.Module._extensions..js (module.js:550:10)
[INFO]     at Module.load (module.js:458:32)
[INFO]     at tryModuleLoad (module.js:417:12)
[INFO]     at Function.Module._load (module.js:409:3)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Object.<anonymous> (/files/metron/metron-interface/metron-config/node_modules/request/index.js:18:15)
[INFO]     at Module._compile (module.js:541:32)
[INFO]     at Object.Module._extensions..js (module.js:550:10)
[INFO]     at Module.load (module.js:458:32)
[INFO]     at tryModuleLoad (module.js:417:12)
[INFO]     at Function.Module._load (module.js:409:3)
[INFO]     at Module.require (module.js:468:17)
[INFO]     at require (internal/module.js:20:19)
[INFO]     at Leek._enqueue (/files/metron/metron-interface/metron-config/node_modules/leek/lib/leek.js:60:30)
[INFO]     at Leek.track (/files/metron/metron-interface/metron-config/node_modules/leek/lib/leek.js:87:15)
[INFO]     at Class.Command.validateAndRun (/files/metron/metron-interface/metron-config/node_modules/angular-cli/lib/models/command.js:119:18)
[INFO]     at /files/metron/metron-interface/metron-config/node_modules/angular-cli/lib/cli/cli.js:86:22
[INFO]     at tryCatch (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:12)
[INFO]     at invokeCallback (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/-internal.js:211:13)
[INFO]     at /files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/then.js:26:14
[INFO]     at flush (/files/metron/metron-interface/metron-config/node_modules/rsvp/dist/lib/rsvp/asap.js:80:5)
[INFO]     at _combinedTickCallback (internal/process/next_tick.js:67:7)
[INFO]     at process._tickCallback (internal/process/next_tick.js:98:9)

thanks

npm-debug.txt

Explorer

"Cannot find module 'tough-cookie'" is the same error you get when you are on the wrong C++ compiler version. I would check that again.

So after a lot of mostly random debugging i found a solution 🙂

even if i did everything mention so far i got failed on "metron-config" it kept asking for modules like, tough-cookie, safe-json-stringify, json-stringify-safe, stringstream, caseless ..... (although i can find the folders and files for these).

so what i did: (including above about gcc)

after this fails the first time:

mvn clean package -DskipTests -T 2C -P HDP-2.5.0.0,mpack

i did:

cd /location/metron/metron-interface/metron-config
npm install
npm install #read somewhere that doing double is the way to go
cd /location/metron/ #backto original metron location 
mvn  package -DskipTests -T 2C -P HDP-2.5.0.0,mpac

then i got success on all 🙂

hope this helps other people 🙂

New Contributor

It also worked for me! I had an error related to npm, but after doing these steps i got no error. Thanks.

New Contributor

I had the similar question, when I donot added the install-node-and-npm goals in the pom.xml; if i added, the question not; so i want to ask whethet i must add the install-node-and-npm in the pom.xml, whether my pc installed the node or not, thanks.

; ;