​Ok.  Just to clarify, you reported two bugs.  Both of which are related to
building Metron.  I think in METRON-1318 [1] you did not have JAVA_HOME
set.  You then followed some instructions [2] in which you set JAVA_HOME
and made some additional progress.

That led you to report METRON-1320 [3], which appears to be your current
issue.  The current problem is in regards to building the web assets.  It
seems you are running a rather old version of NPM (1.3.6).  How did you
install NPM?  Can you upgrade to a more recent version?  For example, I am
currently running 5.3.0 on my build machine.

[1] https://issues.apache.org/jira/browse/METRON-1318​
[2]
https://github.com/apache/metron/blob/master/metron-deployment/other-examples/manual-install/Manual_Install_CentOS6.md
[3] https://issues.apache.org/jira/browse/METRON-1320

On Mon, Nov 20, 2017 at 10:32 AM, Pawel Bialasiewicz <[email protected]>
wrote:

> The JAVA_HOME is set properly:
>
> [root@ip-172-31-12-59 centos]# echo $JAVA_HOME
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64
> [root@ip-172-31-12-59 centos]# cd metron/
> [root@ip-172-31-12-59 metron]# ls /usr/lib/jvm/
> java                                             java-openjdk
>  jre-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64
> java-1.5.0-gcj-1.5.0.0                           jre
> jre-1.8.0-openjdk.x86_64
> java-1.8.0                                       jre-1.5.0      jre-gcj
> java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64  jre-1.5.0-gcj
> jre-openjdk
> java-1.8.0-openjdk.x86_64                        jre-1.8.0
>
> But I'm still getting the same error with metron-config wfter running `mvn
> clean install -DskipTests`
>
> [ERROR]
> [ERROR] npm ERR! Please include the following file with any support
> request:
> [ERROR] npm ERR!     /home/centos/metron/metron-
> interface/metron-config/npm-debug.log
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Metron ............................................. SUCCESS [
> 2.685 s]
> [INFO] metron-stellar ..................................... SUCCESS [
> 0.172 s]
> [INFO] stellar-common ..................................... SUCCESS [
> 18.952 s]
> [INFO] metron-analytics ................................... SUCCESS [
> 0.107 s]
> [INFO] metron-maas-common ................................. SUCCESS [
> 0.544 s]
> [INFO] metron-platform .................................... SUCCESS [
> 0.132 s]
> [INFO] metron-zookeeper ................................... SUCCESS [
> 0.265 s]
> [INFO] metron-test-utilities .............................. SUCCESS [
> 0.488 s]
> [INFO] metron-integration-test ............................ SUCCESS [
> 4.581 s]
> [INFO] metron-maas-service ................................ SUCCESS [
> 4.157 s]
> [INFO] metron-common ...................................... SUCCESS [
> 15.634 s]
> [INFO] metron-statistics .................................. SUCCESS [
> 16.820 s]
> [INFO] metron-writer ...................................... SUCCESS [
> 15.629 s]
> [INFO] metron-storm-kafka-override ........................ SUCCESS [
> 0.322 s]
> [INFO] metron-storm-kafka ................................. SUCCESS [
> 0.438 s]
> [INFO] metron-hbase ....................................... SUCCESS [
> 0.804 s]
> [INFO] metron-profiler-common ............................. SUCCESS [
> 0.615 s]
> [INFO] metron-profiler-client ............................. SUCCESS [
> 17.469 s]
> [INFO] metron-profiler .................................... SUCCESS [
> 47.523 s]
> [INFO] metron-hbase-client ................................ SUCCESS [
> 6.874 s]
> [INFO] metron-enrichment .................................. SUCCESS [
> 49.150 s]
> [INFO] metron-indexing .................................... SUCCESS [
> 15.715 s]
> [INFO] metron-solr ........................................ SUCCESS [
> 16.203 s]
> [INFO] metron-pcap ........................................ SUCCESS [
> 0.891 s]
> [INFO] metron-parsers ..................................... SUCCESS [
> 48.732 s]
> [INFO] metron-pcap-backend ................................ SUCCESS [
> 27.602 s]
> [INFO] metron-data-management ............................. SUCCESS [
> 53.464 s]
> [INFO] metron-api ......................................... SUCCESS [
> 24.376 s]
> [INFO] metron-management .................................. SUCCESS [
> 7.609 s]
> [INFO] elasticsearch-shaded ............................... SUCCESS [
> 4.840 s]
> [INFO] metron-elasticsearch ............................... SUCCESS [
> 55.619 s]
> [INFO] metron-deployment .................................. SUCCESS [
> 0.096 s]
> [INFO] Metron Ambari Management Pack ...................... SUCCESS [
> 0.307 s]
> [INFO] metron-contrib ..................................... SUCCESS [
> 0.058 s]
> [INFO] metron-docker ...................................... SUCCESS [
> 4.114 s]
> [INFO] metron-interface ................................... SUCCESS [
> 0.619 s]
> [INFO] metron-config ...................................... FAILURE
> [01:21 min]
> [INFO] metron-alerts ...................................... SKIPPED
> [INFO] metron-rest-client ................................. SKIPPED
> [INFO] metron-rest ........................................ SKIPPED
> [INFO] site-book .......................................... SKIPPED
> [INFO] 3rd party Functions (just for tests) ............... SKIPPED
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------
> ------------
> [INFO] Total time: 09:05 min
> [INFO] Finished at: 2017-11-20T15:27:50+00:00
> [INFO] Final Memory: 221M/4084M
> [INFO] ------------------------------------------------------------
> ------------
> [ERROR] Failed to execute goal 
> com.github.eirslett:frontend-maven-plugin:1.3:npm
> (npm install) on project metron-config: Failed to run task: 'npm install'
> failed. (error code 1) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm install) on
> project metron-config: Failed to run task
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
> MojoExecutor.java:212)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
> MojoExecutor.java:153)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
> MojoExecutor.java:145)
>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.
> buildProject(LifecycleModuleBuilder.java:116)
>         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.
> buildProject(LifecycleModuleBuilder.java:80)
>         at org.apache.maven.lifecycle.internal.builder.singlethreaded.
> SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>         at org.apache.maven.lifecycle.internal.LifecycleStarter.
> execute(LifecycleStarter.java:128)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.
> launchEnhanced(Launcher.java:289)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.
> launch(Launcher.java:229)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.
> mainWithExitCode(Launcher.java:415)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.
> main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run
> task
>         at com.github.eirslett.maven.plugins.frontend.mojo.
> AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
>         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
> DefaultBuildPluginManager.java:134)
>         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
> MojoExecutor.java:207)
>         ... 20 more
> Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException:
> 'npm install' failed. (error code 1)
>         at com.github.eirslett.maven.plugins.frontend.lib.
> NodeTaskExecutor.execute(NodeTaskExecutor.java:60)
>         at com.github.eirslett.maven.plugins.frontend.mojo.NpmMojo.
> execute(NpmMojo.java:62)
>         at com.github.eirslett.maven.plugins.frontend.mojo.
> AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
>         ... 22 more
> [ERROR]
> [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
> [root@ip-172-31-12-59 metron]#
> [0] 0:bash*
>
>
>
> And a part of debug logfile:
> 164419 silly lifecycle [email protected]~install: no script for install,
> continuing
> 164420 silly install [email protected] /home/centos/metron/metron-
> interface/metron-config/node_modules/.staging/phantomjs-prebuilt-7529dcdc
> 164421 info lifecycle [email protected]~install:
> [email protected]
> 164422 verbose lifecycle [email protected]~install: unsafe-perm
> in lifecycle false
> 164423 verbose lifecycle [email protected]~install: PATH:
> /home/centos/metron/metron-interface/metron-config/node/
> node_modules/npm/bin/node-gyp-bin:/home/centos/metron/
> metron-interface/metron-config/node_modules/phantomjs-
> prebuilt/node_modules/.bin:/home/centos/metron/metron-
> interface/metron-config/node_modules/.bin:/home/centos/
> metron/metron-interface/metron-config/node:/home/centos/metron/metron-
> interface/metron-config/node:/opt/apache-maven-3.3.9/bin:/
> usr/local/sbin:/opt/apache-maven-3.3.9/bin:/opt/apache-
> maven-3.3.9/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:
> 164424 verbose lifecycle [email protected]~install: CWD:
> /home/centos/metron/metron-interface/metron-config/node_
> modules/phantomjs-prebuilt
> 164425 silly lifecycle [email protected]~install: Args: [ '-c',
> 'node install.js' ]
> 164426 silly lifecycle [email protected]~install: Returned: code:
> 1  signal: null
> 164427 info lifecycle [email protected]~install: Failed to exec
> install script
> 164428 verbose unlock done using 
> /root/.npm/_locks/staging-6cc4c33695d034a4.lock
> for /home/centos/metron/metron-interface/metron-config/node_
> modules/.staging
> 164429 silly rollbackFailedOptional Starting
> 164430 silly rollbackFailedOptional Finishing
> 164431 silly runTopLevelLifecycles Starting
> 164432 silly runTopLevelLifecycles Finishing
> 164433 silly install printInstalled
> 164434 warn optional Skipping failed optional dependency
> /chokidar/fsevents:
> 164435 warn notsup Not compatible with your operating system or
> architecture: [email protected]
> 164436 warn [email protected] requires a peer of webpack@^2.0.0 ||
> ^3.0.0 but none was installed.
> 164437 warn [email protected] requires a peer of webpack@1 || 2
> || 3 but none was installed.
> 164438 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164439 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164440 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164441 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164442 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164443 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164444 warn @angular/[email protected] requires a peer of
> @angular/[email protected] but none was installed.
> 164445 warn [email protected] requires a peer of webpack@^1.0.0
> || ^2.0.0 || ^3.0.0 but none was installed.
> 164446 verbose stack Error: [email protected] install: `node
> install.js`
> 164446 verbose stack Exit status 1
> 164446 verbose stack     at EventEmitter.<anonymous>
> (/home/centos/metron/metron-interface/metron-config/node/
> node_modules/npm/lib/utils/lifecycle.js:245:16)
> 164446 verbose stack     at emitTwo (events.js:106:13)
> 164446 verbose stack     at EventEmitter.emit (events.js:191:7)
> 164446 verbose stack     at ChildProcess.<anonymous>
> (/home/centos/metron/metron-interface/metron-config/node/
> node_modules/npm/lib/utils/spawn.js:24:14)
> 164446 verbose stack     at emitTwo (events.js:106:13)
> 164446 verbose stack     at ChildProcess.emit (events.js:191:7)
> 164446 verbose stack     at maybeClose (internal/child_process.js:850:16)
> 164446 verbose stack     at Process.ChildProcess._handle.onexit
> (internal/child_process.js:215:5)
> 164447 verbose pkgid [email protected]
> 164448 verbose cwd /home/centos/metron/metron-interface/metron-config
> 164449 error Linux 2.6.32-696.1.1.el6.x86_64
> 164450 error argv "/home/centos/metron/metron-
> interface/metron-config/node/node" "/home/centos/metron/metron-
> interface/metron-config/node/node_modules/npm/bin/npm-cli.js" "install"
> 164451 error node v6.2.0
> 164452 error npm  v3.8.9
> 164453 error code ELIFECYCLE
> 164454 error [email protected] install: `node install.js`
> 164454 error Exit status 1
> 164455 error Failed at the [email protected] install script 'node
> install.js'.
> 164455 error Make sure you have the latest version of node.js and npm
> installed.
> 164455 error If you do, this is most likely a problem with the
> phantomjs-prebuilt package,
> 164455 error not with npm itself.
> 164455 error Tell the author that this fails on your system:
> 164455 error     node install.js
> 164455 error You can get information on how to open an issue for this
> project with:
> 164455 error     npm bugs phantomjs-prebuilt
> 164455 error Or if that isn't available, you can get their info via:
> 164455 error     npm owner ls phantomjs-prebuilt
> 164455 error There is likely additional logging output above.
> 164456 verbose exit [ 1, true ]
>
>

Reply via email to