Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running gatling with or without containers produces a different result. #35

Open
stefjoosten opened this issue Jan 7, 2022 · 1 comment

Comments

@stefjoosten
Copy link

I am trying to reproduce my gatling simulation inside a docker container. However I get different results with and without a container.

Without containers I get a correct simulation, while using openjdk version "17.0.1" 2021-10-19 and gatling version 3.7.2:

GATLING_HOME is set to /Users/sjo00577/git/RAP/gatling-3-7-2
RAPtest is the only simulation, executing it.
Select run description (optional)
12:42:47.629 [WARN ] i.g.c.s.e.ElCompiler$ - You're still using the deprecated ${} pattern for Gatling EL. Please use to the #{} pattern instead.
n=67 offset=0 test=true char=/
n=67 offset=67 test=false char=/
n=83 offset=76 test=true char=/

<leaving out a large chunk of log file, picking up on results to show that it has worked>

================================================================================
2022-01-06 12:43:48                                          59s elapsed
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=31     KO=1     )
> Home                                                     (OK=1      KO=0     )
> Home Redirect 1                                          (OK=1      KO=0     )
> polyfill.min.js                                          (OK=1      KO=0     )
> ampersand.min.css?2007197015985610770                    (OK=1      KO=0     )
> project.min.css?2007197015985610770                      (OK=1      KO=0     )
> project.min.js?2007197015985610770                       (OK=1      KO=0     )
> ampersand.min.js?2007197015985610770                     (OK=1      KO=0     )
> lib.min.css?2007197015985610770                          (OK=1      KO=0     )
> logo-ou.png                                              (OK=1      KO=0     )

<leaving out a small chunk of log file, picking it up at the end to show that it terminates properly>

================================================================================

Reports generated in 0s.
Please open the following file: /Users/sjo00577/git/RAP/gatling-3-7-2/results/raptest-20220106114247711/index.html

However, the denvazh/gatling image does not work. That image uses gatling vs. 3.2.1, so I took the Dockerfile and adapted it to work with gatling vs. 3.7.2 to see if the version difference can explain the result. Unfortunately, both versions produced an identical result.
This is the result I get:

RAP % docker compose logs test-elf -f
gatling  | GATLING_HOME is set to /opt/gatling
gatling  | OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
gatling  | RAPtest is the only simulation, executing it.
gatling  | Select run description (optional)
gatling  | 12:02:25.079 [ERROR] i.g.a.Gatling$ - Run crashed
gatling  | java.lang.NullPointerException: Cannot invoke "String.trim()" because the return value of "scala.io.StdIn$.readLine()" is null
gatling  |      at io.gatling.app.Selection$Selector.askRunDescription(Selection.scala:141)
gatling  |      at io.gatling.app.Selection$Selector.$anonfun$selection$5(Selection.scala:61)
gatling  |      at scala.Option.getOrElse(Option.scala:201)
gatling  |      at io.gatling.app.Selection$Selector.selection(Selection.scala:61)
gatling  |      at io.gatling.app.Selection$.apply(Selection.scala:36)
gatling  |      at io.gatling.app.Runner.run0(Runner.scala:61)
gatling  |      at io.gatling.app.Runner.run(Runner.scala:49)
gatling  |      at io.gatling.app.Gatling$.start(Gatling.scala:87)
gatling  |      at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
gatling  |      at io.gatling.app.Gatling$.main(Gatling.scala:38)
gatling  |      at io.gatling.app.Gatling.main(Gatling.scala)
gatling  | Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.trim()" because the return value of "scala.io.StdIn$.readLine()" is null
gatling  |      at io.gatling.app.Selection$Selector.askRunDescription(Selection.scala:141)
gatling  |      at io.gatling.app.Selection$Selector.$anonfun$selection$5(Selection.scala:61)
gatling  |      at scala.Option.getOrElse(Option.scala:201)
gatling  |      at io.gatling.app.Selection$Selector.selection(Selection.scala:61)
gatling  |      at io.gatling.app.Selection$.apply(Selection.scala:36)
gatling  |      at io.gatling.app.Runner.run0(Runner.scala:61)
gatling  |      at io.gatling.app.Runner.run(Runner.scala:49)
gatling  |      at io.gatling.app.Gatling$.start(Gatling.scala:87)
gatling  |      at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
gatling  |      at io.gatling.app.Gatling$.main(Gatling.scala:38)
gatling  |      at io.gatling.app.Gatling.main(Gatling.scala)
^C^CERRO[0168] got 3 SIGTERM/SIGINTs, forcing shutdown

I have also done an experiment with the official image of openjdk version 17.0.1, to be entirely sure that gatling runs the same java as my laptop. However, the result is identical again. So it might be something different than version conflicts here...

@nptri
Copy link

nptri commented Mar 28, 2024

hi @stefjoosten did you managed to resolve this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants