elastic / elastic/kibana-load-testing
[Bug] HttpHelper - Exception occurred when running Kibana with a base path
- Dominant language
- Scala
- Stars
- 6
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
## Summary ##
A fresh pull and install causes a build failure locally when running against a local instance of Kibana (master).
## Details ##
Setup:
- ES and APM servers running through Docker as per the [apm-integration-testing](https://github.com/elastic/apm-integration-testing) repo with `./scripts/compose.py start master --no-kibana`
- Kibana running locally with auth (and modified `local.conf` to use the auth that the `apm-integration-testing` service provides)
- Verified that ES and the APM server and Kibana were connected (manually opened Kibana, added the Logs sample data set and navigated around a bit)
- local clone of this repo, run with:
```
export env=config/local.conf
mvn gatling:test -Dgatling.simulationClass=org.kibanaLoadTest.simulation.DemoJourney
```
Result:
```
[ERROR] i.g.a.Gatling$ - Run crashed
java.lang.RuntimeException: Adding sample data failed:
```
Expected result:
- the sample dataset should be added successfully.
The issue appears to be with adding the sample data:
```
}}
09:57:11.179 [INFO ] Base Simulation - Loading sample data
09:57:11.297 [ERROR] HttpHelper - Exception occurred during loading sample data
09:57:11.299 [ERROR] i.g.a.Gatling$ - Run crashed
java.lang.RuntimeException: Adding sample data failed:
at org.kibanaLoadTest.helpers.HttpHelper.addSampleData(HttpHelper.scala:94)
```
Full stack trace:
```bash
09:57:10.866 [INFO ] Base Simulation - Running DemoJourney simulation
09:57:11.178 [INFO ] KibanaConfiguration - Base URL = http://localhost:5601
09:57:11.179 [INFO ] KibanaConfiguration - Kibana version = 8.0.0
09:57:11.179 [INFO ] KibanaConfiguration - Security Enabled = true
09:57:11.179 [INFO ] KibanaConfiguration - Auth payload = {"providerType":"basic","providerName":"basic","currentURL":"http://localhost:5601/login","params":{"username":"admin","password":"changeme"}}
09:57:11.179 [INFO ] Base Simulation - Loading sample data
09:57:11.297 [ERROR] HttpHelper - Exception occurred during loading sample data
09:57:11.299 [ERROR] i.g.a.Gatling$ - Run crashed
java.lang.RuntimeException: Adding sample data failed:
at org.kibanaLoadTest.helpers.HttpHelper.addSampleData(HttpHelper.scala:94)
at org.kibanaLoadTest.simulation.BaseSimulation.$anonfun$new$1(BaseSimulation.scala:56)
at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1(Simulation.scala:154)
at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1$adapted(Simulation.scala:154)
at scala.collection.immutable.List.foreach(List.scala:431)
at io.gatling.core.scenario.Simulation.executeBefore(Simulation.scala:154)
at io.gatling.app.Runner.run0(Runner.scala:70)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.RuntimeException: Adding sample data failed:
at org.kibanaLoadTest.helpers.HttpHelper.addSampleData(HttpHelper.scala:94)
at org.kibanaLoadTest.simulation.BaseSimulation.$anonfun$new$1(BaseSimulation.scala:56)
at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1(Simulation.scala:154)
at io.gatling.core.scenario.Simulation.$anonfun$executeBefore$1$adapted(Simulation.scala:154)
at scala.collection.immutable.List.foreach(List.scala:431)
at io.gatling.core.scenario.Simulation.executeBefore(Simulation.scala:154)
at io.gatling.app.Runner.run0(Runner.scala:70)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.925 s
[INFO] Finished at: 2020-12-05T09:57:11-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.1.0:test (default-cli) on project kibana-load-test: Gatling failed.: Process exited with an error: 255 (Exit value: 255) -> [Help 1]
[ERROR]
```
## What does work ##
- When I create a new cloud deployment as part of the test run, it works fine.
- Running the tests against a `7.10.0-SNAPSHOT` through docker locally without any issues, with [apm-integration-testing](https://github.com/elastic/apm-integration-testing) run with `./scripts/compose.py start 7.10.0 --with-kibana` and `config/local.conf` as:
```
app {
host = "http://localhost:5601"
version = "7.10.0-SNAPSHOT"
}
security {
on = true
}
auth {
providerType = "basic"
providerName = "basic"
username = "admin"
password = "changeme"
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with HttpHelper.scala:94, where addSampleData fails, and trace its call from BaseSimulation.scala:56. Reproduce the failure using config/local.conf and the documented mvn gatling:test command against Kibana with a base path. Done means the sample dataset is added successfully and the DemoJourney run completes without the RuntimeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100