Sahil Paudel
Sahil Paudel

Reputation: 474

Unable to run keycloak performance testsuite

I followed the steps provided by this README.md file Keycloak testsuite readme

I am able to build the project but however when I run cd testsuite/performance mvn clean install

I am getting

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/infinispan.xml:37: Execute failed: java.io.IOException: Cannot run program "./ispn-cli.sh" (in directory "/Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/infinispan-server-10.1.8.Final/bin"): error=2, No such file or directory
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... @ 4:64 in /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :performance-keycloak-infinispan-server

Has anyone come across this issue and resolved it. I tried there issue tracker but it hosted separately and not previous such stacktrace is there.

Upvotes: 2

Views: 364

Answers (1)

Charles Wei
Charles Wei

Reputation: 571

TLDR; If you need to take a performance test on Keycloak try the newer version https://github.com/keycloak/keycloak-benchmark instead.


I met the same issue on Keycloak 12.0.4, below is my research:

I found ispn-cli.sh is the old name of infinispan cli. Now the name is cli.sh But event if you rename the cli.sh to ispn-cli.sh, it won't work. Because you will meet another issue like below, which means missing ...standalone/configuration/clustered.xml for short.

main:

check-configuration-state:
     [echo] configured: ${configured}
     [echo] management.configured: ${management.configured}

configure-infinispan:
     [copy] Copying 1 file to /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/bin
     [exec] org.aesh.command.parser.CommandLineParserException: batch 'embed-server' is not a batch command. See 'batch --help'.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Keycloak Performance TestSuite 12.0.4:
[INFO]
[INFO] Keycloak Performance TestSuite ..................... SUCCESS [  1.718 s]
[INFO] Keycloak Performance TestSuite - Keycloak Server ... SUCCESS [ 24.548 s]
[INFO] Keycloak Performance TestSuite - Wildfly ModCluster Load Balancer SUCCESS [ 15.843 s]
[INFO] Keycloak Performance TestSuite - Infinispan Server . FAILURE [  2.869 s]
[INFO] Keycloak Performance TestSuite - Tests ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  45.270 s
[INFO] Finished at: 2021-06-19T03:21:30Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (configure-infinispan) on project performance-keycloak-infinispan-server: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/ubuntu/keycloak12/testsuite/performance/infinispan/infinispan.xml:43: Warning: Could not find file /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/infinispan-server-11.0.4.Final/standalone/configuration/clustered.xml to copy.
[ERROR] around Ant part ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... @ 4:64 in /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -> [Help 1]

So I went through Keycloak git history and found this commit https://github.com/keycloak/keycloak/commit/df68ca8dcfd481ee64801fbc2cecaa0a6359285d The infinispan version was based on jboss/infinispan-server:8.2.6.Final. Then, I checked the most closest version of infinispan-server(because 8.2.6.Final is not found anymore), it has all the necessary files.

$ unzip -l infinispan-server-8.1.3.Final-bin.zip | grep -E "standalone/configuration/|ispn-cli.sh"
        0  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/
     2500  2016-04-04 08:51   infinispan-server-8.1.3.Final/bin/ispn-cli.sh
    17968  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/clustered.xml
     1112  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/mgmt-users.properties
      711  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/application-roles.properties
     2697  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/logging.properties
      669  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/mgmt-groups.properties
    12084  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/standalone.xml
      935  2016-04-04 08:51   infinispan-server-8.1.3.Final/standalone/configuration/application-users.properties

Besides that, I found this, which is saying infinispan.version is based on root config. That means infinispan has changed a lot, but testsuite/performance/infinispan isn't keep up to date.

// testsuite/performance/infinispan/pom.xml
        <infinispan.artifactId>infinispan-server-build</infinispan.artifactId>
        <!--infinispan.version is located in the root pom.xml--> 
        <infinispan.unpacked.folder.name>infinispan-server-${infinispan.version}</infinispan.unpacked.folder.name>

And infinispan module was removed in this commit: https://github.com/keycloak/keycloak/commit/54c5b1514f0611056f38053081d094cf5e5fd08a#diff-bc3567ad76edc320e3fa85c5e0e5380e09c11f94c8395b80064e195f2ef82793

So, I strongly doubt Keycloak testsuite/performance is stalled.

Upvotes: 1

Related Questions