无法运行Keycloak性能测试套件。

huangapple go评论68阅读模式
英文:

Unable to run keycloak performance testsuite

问题

我按照这个 README.md 文件提供的步骤进行操作:
Keycloak 测试套件自述文件

我能够构建这个项目,但是当我运行以下命令时:
cd testsuite/performance
mvn clean install

我遇到了以下问题:

[ERROR] 无法执行目标 org.apache.maven.plugins:maven-antrun-plugin:1.8:run(configure-infinispan),位于项目 performance-keycloak-infinispan-server 上:发生 Ant BuildException:在执行此行时发生以下错误:
[ERROR] /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/infinispan.xml:37: 执行失败:java.io.IOException: 无法运行程序“./ispn-cli.sh”(位于目录“/Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/infinispan-server-10.1.8.Final/bin”):错误=2,没有那个文件或目录
[ERROR] 位于 Ant 部分周围 ...<ant antfile="infinispan.xml" target="configure-infinispan"/>... @ 4:64,位于 /Users/sahilpaudel/Documents/Java/keycloak-testing/keycloak/testsuite/performance/infinispan/target/antrun/build-main.xml 中
[ERROR] -> [帮助 1]
[ERROR]
[ERROR] 要查看错误的完整堆栈跟踪信息,请使用 -e 开关重新运行 Maven。
[ERROR] 使用 -X 开关重新运行 Maven,以启用完整的调试日志记录。
[ERROR]
[ERROR] 有关这些错误和可能解决方案的更多信息,请阅读以下文章:
[ERROR] [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] 在纠正问题后,您可以使用以下命令恢复构建
[ERROR]   mvn <args> -rf :performance-keycloak-infinispan-server

是否有人遇到过这个问题并解决了呢?
我尝试过他们的问题跟踪器,但它是单独托管的,并且以前没有类似的堆栈跟踪信息。

英文:

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.

答案1

得分: 1

TLDR; 如果你需要在Keycloak上进行性能测试,请尝试使用更新的版本https://github.com/keycloak/keycloak-benchmark。


我在Keycloak 12.0.4上遇到了相同的问题,以下是我的研究:

我发现ispn-cli.sh是infinispan cli的旧名称。现在的名称cli.sh
但是,即使你将cli.sh重命名为ispn-cli.sh,它也不会起作用。因为你会遇到另一个问题,就像下面这样,意味着缺少...standalone/configuration/clustered.xml

main:

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

configure-infinispan:
     点击复制 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 occurred: 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]

因此,我查看了Keycloak的git历史记录,并找到了这个提交 https://github.com/keycloak/keycloak/commit/df68ca8dcfd481ee64801fbc2cecaa0a6359285d
infinispan版本基于jboss/infinispan-server:8.2.6.Final。然后,我检查了最接近的infinispan-server版本(因为8.2.6.Final不再存在),它有所有必要的文件。

$ 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

此外,我发现这个,它说infinispan.version是基于根配置的。这意味着infinispan已经发生了很大的变化,但testsuite/performance/infinispan没有保持更新。

// 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>

而且,在这个提交中删除了infinispan模块:
https://github.com/keycloak/keycloak/commit/54c5b1514f0611056f38053081d094cf5e5fd08a#diff-bc3567ad76edc320e3fa85c5e0e5380e09c11f94c8395b80064e195f2ef82793

因此,我强烈怀疑Keycloak的testsuite/performance已经停滞不前。

英文:

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:
     点击复制 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 &#39;embed-server&#39; is not a batch command. See &#39;batch --help&#39;.
[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 ...&lt;ant antfile=&quot;infinispan.xml&quot; target=&quot;configure-infinispan&quot;/&gt;... @ 4:64 in /home/ubuntu/keycloak12/testsuite/performance/infinispan/target/antrun/build-main.xml
[ERROR] -&gt; [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 &quot;standalone/configuration/|ispn-cli.sh&quot;
        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
        &lt;infinispan.artifactId&gt;infinispan-server-build&lt;/infinispan.artifactId&gt;
        &lt;!--infinispan.version is located in the root pom.xml--&gt; 
        &lt;infinispan.unpacked.folder.name&gt;infinispan-server-${infinispan.version}&lt;/infinispan.unpacked.folder.name&gt;

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.

huangapple
  • 本文由 发表于 2020年8月20日 19:13:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/63503817.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定