8000 Error when running benchmarks from CLI for kcb.sh script · Issue #956 · keycloak/keycloak-benchmark · GitHub
[go: up one dir, main page]

Skip to content

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

Open

Description

@orivat

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)
  ...
...

Activity

  1. ahus1 commented on Aug 28, 2024

    @ahus1
    Member

    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.

  2. self-assigned this
    on Aug 28, 2024
  3. orivat commented on Aug 28, 2024

    @orivat
    Author

    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

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0