Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
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

avatar
Contributor

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

avatar
Contributor

"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.

avatar

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 🙂

avatar
Explorer

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

avatar
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.