I’m hitting a very strange behaviour with trying to run some of our Gatling tests over HTTPS.
The tests work correctly over HTTP.
Switching to HTTPS, the tests that involve Multipart Mime Posts, e.g.:
var buildRequest = http(name + “_post_f”).post(base + action)
buildRequest = buildRequest.bodyPart(RawFileBodyPart(“file”, file, “application/octet-stream”).withFileName(“test.pdf”))
buildRequest = buildRequest.bodyPart(StringBodyPart(“apikey”, apikey))
are all failing.
Tests that use GET or non-multi-part Mime POSTS are working fine.
What seems to be happening is that the target is closing the connection shortly after the request has been received, because it is receiving an unexpected junk character after the request.
If I wireshark the connection (see attached files), gatling seems to be correctly sending the request (packet 23) and then separately sends an additional junk “-” character (packet 24)
We saw some some issues before summer in galting 2.
Stephane fixed everything during the summer - if you run from master, this should be ok (however, right now master HEAD is having issues, but you can build commit fb8c779 which works ok)
@Stefan, I’ve just fixed the issues you reported on master (also implemented the feature). A snapshot will be available soon on Sonatype.
@Dave, this is a bit old in my mind, so I can’t recall for sure if this is something that’s fixed in Netty/AsyncHttpClient. You might want to try to upgrade just the deps. Latest Netty 3 is 3.7.0.Final and AHC 1.7.21.
Please let me know if upgrading to Gatling master or upgrading the deps fix the problem. If not, the problem is either in AHC or Netty and I will dig deeper…
Then, Gatling 1 was built with maven, while Gatling 2 is now built with sbt. Basically, you just have to clone the projects from github or even just download a tarball, then either mvn clean install or sbt package.
If building yourself is too complex, you can just fetch a snapshot from our continuous integration. Snapshots are hosted on Sonatype (https://oss.sonatype.org/content/repositories/snapshots/io/gatling/highcharts/gatling-charts-highcharts/) and next Gatling 2 releases will be on central.
Some multipart related issues have just been raised on AsyncHttpClient: https://github.com/AsyncHttpClient/async-http-client/issues/409
I think they could match yours.
We’ll probably need a few days to sort this out, have a fix released for AHC and then update Gatling.