2.2.0-M2 - java.io.IOException: Closed

Hello.
I am running Gatling from Java application - there are two different scenarios and I run them one by one with

gatlingCLArgs = new String[] {
        "-m",
        "-sf", sbfDirectory,
        "-rf", resultsDirectory
};
Gatling.fromArgs(gatlingCLArgs, scala.Option.apply((Class<Simulation>) simulationClass));

It worked well while I was on version 2.1.6 but as I upgraded to 2.2.0-M2, the second scenario started failing with java.io.IOException: Closed
Every request fails including the warm up one:

2015-06-04 15:17:52,100 INFO null [main] i.g.h.c.HttpProtocol$ Start warm up
2015-06-04 15:17:52,132 INFO null [main] i.g.h.c.HttpProtocol$ Couldn’t execute warm up request http://gatling.io
java.util.concurrent.ExecutionException: java.io.IOException: Closed
at com.ning.http.client.ListenableFuture$CompletedFailure.(ListenableFuture.java:91) ~[async-http-client-1.9.18.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:90) ~[async-http-client-1.9.18.jar:na]
at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:486) ~[async-http-client-1.9.18.jar:na]
at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:508) ~[async-http-client-1.9.18.jar:na]
at io.gatling.http.config.HttpProtocol$$anonfun$1.apply(HttpProtocol.scala:123) [gatling-http-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.http.config.HttpProtocol$$anonfun$1.apply(HttpProtocol.scala:102) [gatling-http-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.http.config.HttpProtocol.warmUp(HttpProtocol.scala:198) [gatling-http-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.core.config.Protocols$$anonfun$warmUp$1.apply(Protocols.scala:49) [gatling-core-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.core.config.Protocols$$anonfun$warmUp$1.apply(Protocols.scala:49) [gatling-core-2.2.0-M2.jar:2.2.0-M2]
at scala.collection.Iterator$class.foreach(Iterator.scala:750) [scala-library-2.11.6.jar:na]
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202) [scala-library-2.11.6.jar:na]
at scala.collection.MapLike$DefaultValuesIterable.foreach(MapLike.scala:206) [scala-library-2.11.6.jar:na]
at io.gatling.core.config.Protocols.warmUp(Protocols.scala:49) [gatling-core-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.core.runner.Runner.run(Runner.scala:74) [gatling-core-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.ConfiguredGatling$$anonfun$runSimulationIfNecessary$2.apply(Gatling.scala:137) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.ConfiguredGatling$$anonfun$runSimulationIfNecessary$2.apply(Gatling.scala:122) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at scala.Option.getOrElse(Option.scala:121) [scala-library-2.11.6.jar:na]
at io.gatling.app.ConfiguredGatling.runSimulationIfNecessary(Gatling.scala:122) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.ConfiguredGatling.start(Gatling.scala:75) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.Gatling.start(Gatling.scala:65) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:52) [gatling-app-2.2.0-M2.jar:2.2.0-M2]
at io.gatling.app.Gatling.fromArgs(Gatling.scala) [gatling-app-2.2.0-M2.jar:2.2.0-M2]

It is not a problem with scenario - if I swap the order, the problem persist - whatever scenario is the first passes and the second fails.

What could it be?

Thank you.

A reproducer would help.

Note that those milestones were released for our clients, and they’re not documented.

If there is a way to get stats.json from 2.1.6 I would be happy to roll back to it.
We started 2.0.0-Msomething which was generating TSV stats file and used it for some time. After upgrade to 2.1.6 the TSV file was gone and the only JSON file with stats was js/global_stats.json which did not have per-request statistics. So we were kind of forced to jump to 2.2.0…

I will try to create a test case but it will take time. I just hoped that it is something known to you - like some global/static HTTP client is used so it becomes invalid after first invocation or something like that. I do not know…

Cheers

Here we go: https://github.com/dimas/gatling-2.2.0-bug-demo

mvn clean install
java -jar target/gatling-2.2.0-bug-demo-0.1.jar

The first test runs ok and the second produces:

18:12:53.574 [main] INFO io.gatling.http.config.HttpProtocol$ - Start warm up
18:12:53.583 [main] DEBUG c.n.h.c.AsyncCompletionHandlerBase - Closed
java.io.IOException: Closed
at com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequest(NettyRequestSender.java:94) ~[async-http-client-1.9.18.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:87) ~[async-http-client-1.9.18.jar:na]

Cheers

Works as expected with 2.2.0-M3

Hm. You are right.
I was confused by this thing http://mvnrepository.com/artifact/io.gatling/gatling-maven-plugin telling me M2 is the latest version.

Thanks