You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Serge Huber <sh...@jahia.com> on 2017/05/22 08:40:45 UTC

Problem with Karaf integration tests - The forked VM terminated without properly saying goodbye

Hello,

I’m really at a loss on a problem with my Karaf integration tests in the Apache Unomi project. I hope someone will have seen this before and can help. 

Basically I’m getting the following error message when running the tests : 

[ERROR] Please refer to /Users/loom/java/technologies/apache-git/incubator-unomi/itests/target/failsafe-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/loom/java/technologies/apache-git/incubator-unomi/itests && /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java -jar /Users/loom/java/technologies/apache-git/incubator-unomi/itests/target/surefire/surefirebooter4843476313458241790.jar /Users/loom/java/technologies/apache-git/incubator-unomi/itests/target/surefire 2017-05-22T10-01-34_499-jvmRun1 surefire2174671162558600468tmp surefire_04040816426855777816tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:494)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:441)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:292)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
[ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
[ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
[ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
[ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /Users/loom/java/technologies/apache-git/incubator-unomi/itests && /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java -jar /Users/loom/java/technologies/apache-git/incubator-unomi/itests/target/surefire/surefirebooter4843476313458241790.jar /Users/loom/java/technologies/apache-git/incubator-unomi/itests/target/surefire 2017-05-22T10-01-34_499-jvmRun1 surefire2174671162558600468tmp surefire_04040816426855777816tmp
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:679)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:117)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:429)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:406)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[ERROR] at java.lang.Thread.run(Thread.java:745)
[ERROR] -> [Help 1]
[ERROR] 

I’ve been trying to debug this to figure out what is wrong, but the combination of the Surefire Booter, the Pax Exam Driver and Container is a bit too much of generated code for me to debug this. If anyone has some pointers, I’d be more than interested !

You find find the code here : 

https://github.com/apache/incubator-unomi/tree/master/itests <https://github.com/apache/incubator-unomi/tree/master/itests>

You’ll have to compile the top level project first, simply by running mvn clean install and then change to the itests directory and run : mvn clean install.

It seems like a timing issue because sometimes the tests seem to execute properly. Also note that the integration tests will launch an ElasticSearch server on the default ports, so be careful if you already have it running. I’ve planned to change the ports to non-default ones, but first I wanted to fix this problem.

Regards,
  Serge…