Strange problem when I execute the gatling maven plugin in Jenkins

Hi Andrea,

This plugin is supposed to work with 2M3a.

I think that the problem is related to the environment where your Jenkins runs (which is? your own machine? which OS? Couldbees?).
It seems that somehow, the directory were the simulation was compiled either couldn’t be created, or was removed by someone else.

Does it ring a bell?

I’ve improved logging to help debugging this, but it will only be in the next version: https://github.com/excilys/gatling/issues/1768

Cheers,

Stéphane

Hi Stéphane,
the problem is related with the job name in Jenkins, if there are spaces in it the plugin fails with that error. I removed the spaces and everything goes well.
I don’t know if the problem is how Jenkins invoke the plugin, but I have other jobs with spaces using other plugins that work well.

In any case my environment is Jenkins running in Tomcat on Mac OS.

Hope this can help.

Thanks,
Andrea

OK, so this is the same problem as this: https://github.com/excilys/gatling/wiki/Getting-Started#install
A Jenkins job home is a directory with the name of the job and Gatling doesn’t like this kind of path.

Thanks for reporting, and great job for finding out!

Hi,
for who is interested, Jenkins give you the possibility to display a job name without spaces with spaces.
In the Jenkins job configuration window is possible to set the job display name like in the screen shot attached.

Cheers,
Andrea

Capture.JPG

Hi Andrea,

I hope all is fine to you,
I have al most the same problem but without jenkins, I have a simple project using Gatling 2.1.7, the maven plugin, version 3.3.9, compile and execute the test scenario, while when I execute the project I receive this error.

[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.1.7:execute (default-cli) on project mindrailherez: Gatling failed. Simulations compilation failed. Process exited with an error: 1 (Exit value: 1) → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.gatling:gatling-maven-plugin:2.1.7:execute (default-cli) on project mindrailherez: Gatling failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: org.apache.maven.plugin.MojoExecutionException: Gatling failed.
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:191)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
… 25 more
Caused by: io.gatling.mojo.CompilationException: Simulations compilation failed.
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:209)
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:181)
… 27 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:151)
at io.gatling.mojo.Fork.run(Fork.java:81)
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:207)
… 28 more

Thanks and best regards.

Hi Omar, did you find a resolution to this problem? I have a nearly identical error and can find nothing useful on the internet to help me fix it. I suspect my version on the plugin may not match the version it’s supposed to go with in the actual gatling version. Could you share the solution you used?

[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:execute (default-cli) on project retric-perf-tests: Gatling failed. Simulations compilation failed. Process exited with an error: 255 (Exit value: 255) → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.gatling:gatling-maven-plugin:2.2.4:execute (default-cli) on project retric-perf-tests: Gatling failed.
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.MojoExecutionException: Gatling failed.
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:219)
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: io.gatling.mojo.CompilationException: Simulations compilation failed.
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:267)
at io.gatling.mojo.GatlingMojo.execute(GatlingMojo.java:203)
… 22 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 255 (Exit value: 255)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:402)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:164)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:151)
at io.gatling.mojo.Fork.run(Fork.java:120)
at io.gatling.mojo.GatlingMojo.executeCompiler(GatlingMojo.java:265)
… 23 more
[ERROR]
[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/MojoExecutionException

Hello Andrea,
Any update on your problem that you have posted here?I am facing similar kind of issue.

Hello @Daniel,

Did you get any solution for your problem? I’ve exactly the same problem. If you can share your fixing steps then it would be great. Thanks

Please check your java version ? (Try using 1.8.x)