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

Error when running benchmarks from CLI for kcb.sh script #956

Open
orivat opened this issue Aug 28, 2024 · 2 comments
Open

Error when running benchmarks from CLI for kcb.sh script #956

orivat opened this issue Aug 28, 2024 · 2 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@orivat
Copy link

orivat commented Aug 28, 2024

Describe the bug

When following doc instruction
-Running benchmarks from the CLI

https://www.keycloak.org/keycloak-benchmark/benchmark-guide/latest/run/running-benchmark-cli

Version

25.0.4

Expected behavior

To have a successful kcb.sh execution command secript

Actual behavior

sh kcb.sh
INFO: Running benchmark in single-run mode.
INFO: Running benchmark with users-per-sec=1, result output will be available in: /home/testuser/dev_2024/keycloak-benchmark/benchmark/src/main/content/bin/../results/
Error: Could not find or load main class io.gatling.app.Gatling
Caused by: java.lang.ClassNotFoundException: io.gatling.app.Gatling

How to Reproduce?

Followed the prerequisites:

  • Keycloak URL from [Preparing Keycloak for testing]
  • Build benchmark module using JDK21 (and not 11 as specified in teh doc)

Anything else?

The way to have it working is to place the benchmark module build locally in the directory


$ cd <install-dir>/keycloak-benchmark/benchmark/src/main/content/lib$ 

$ cp /home/testuser/dev_2024/keycloak-benchmark/benchmark/target/keycloak-benchmark-0.14-SNAPSHOT.jar .

cd ../bin

<install-dir>/keycloak-benchmark/benchmark/src/main/content/bin$ sh kcb.sh
INFO: Running benchmark in single-run mode.
INFO: Running benchmark with users-per-sec=1, result output will be available in: /home/testuser/dev_2024/keycloak-benchmark/benchmark/src/main/content/bin/../results/
09:52:44.938 [INFO ] a.e.s.Slf4jLogger - Slf4jLogger started
==========================================================
Target servers: [http://0.0.0.0:8080]
Scenario:
 Name: keycloak.scenario.authentication.ClientSecret
Population:
  realms: 1
  users-per-realm: 1
  clients-per-realm: 1
  realm-name: Not defined
  username: Not defined
  user-password: Not defined
Runtime:
  users-per-sec: 1.0 (Open Workload Model)
  ...
...

@ahus1
Copy link
Contributor

ahus1 commented Aug 28, 2024

The JDK version shown in the docs has been fixed and will be visible on the website shortly. It should state JDK 21.

There might have been a misunderstanding around the docs: They state

Extract the keycloak-benchmark-${version}.[zip|tar.gz] file

Once you extract that file, it should contain all the elements you need, including the shell script and the JAR file in the correct locations.

Please let me know if this resolves it for you.

@ahus1 ahus1 self-assigned this Aug 28, 2024
@ahus1 ahus1 added the kind/bug Something isn't working label Aug 28, 2024
@orivat
Copy link
Author

orivat commented Aug 28, 2024

The doc states

Running the test from the CLI
Preparations
Extract the keycloak-benchmark-${version}.[zip|tar.gz] file

The readability of the doc should be improved,
It is quite confusing as you don't know where you should extract this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants