javamavenjenkinsjvmmaven-surefire-plugin

Maven sure fire started to fail suddenly


I have a Jenkins job that last Friday was working, and since yesterday started to fail. This is my setup

Maven 3.3.9
Oracle JDK 1.8 u144

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.18.1</version>
</plugin>

I tried adding -e and -X options, even increasing log levels, and the only message I see in logs is:

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:9c6abc2:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 31 more
Caused by: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?

This is the list of things I have tried (all from Stackoverflow):

Some other thing I noticed is that when the forked JVM is executed, it seems like the "argLine" are not being passed. For example, this is from the logs:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Forking command line: /bin/sh -c cd /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core && /data/apps/java/jdk1.8.0_144/jre/bin/java -jar /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefirebooter1916960086357827445.jar /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefire2156897915383473994tmp /data/apps/jenkins/workspace/Build_Deploy_Full_Dev/myapp/core/target/surefire/surefire_03179213296845219723tmp

As can be seen, the command line to invoke the forked JVM has no arguments. Also, as last clarification, my tests are not invoking any call like "System.exit". I will appreciate any help!


Solution

  • I ran the build from the same server in which Jenkins is installed, but from outside Jenkins, in other words from the command line. I got a successful build, which indicated me that neither maven nor my dependencies were not part of the cause of the problem. After the restart was completed, the build started to work just fine.