gpt4 book ai didi

wildfly - 阿奎利安 : use different port(s) for the managed WildFly container than a normal WildFly process

转载 作者:行者123 更新时间:2023-12-02 11:05:37 25 4
gpt4 key购买 nike

在开发过程中,我希望能够在 Web 应用程序打开时运行我的 arquillian 测试。两者都使用不同的 WildFly 实例:

  • 我的 Arquillian 测试使用托管(甚至嵌入式)wildfly 容器
  • 为了手动测试我的 Web 应用,我将其从 IntelliJ 部署到 WildFly。

我希望能够并行执行这两个操作,但是当我这样做时,我得到:

Address localhost:9990 is already in use.

org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration

为了解决此问题,我想更改arquillian.xml,以便测试使用不同的端口。我该怎么做?

<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">target/wildfly-${version.org.wildfly}</property>
<property name="javaVmArguments">-Xms512m -Xmx1024m -XX:MaxPermSize=512m</property>
</configuration>
</container>

最佳答案

我认为你应该添加到 javaVmArguments属性:-Djboss.socket.binding.port-offset=1000并添加新属性<property name="managementPort">10990</property>

<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">target/wildfly-${version.org.wildfly}</property>
<property name="managementPort">10990</property>
<property name="javaVmArguments">-Xms512m -Xmx1024m -XX:MaxPermSize=512m -Djboss.socket.binding.port-offset=1000</property>
</configuration>
</container>

关于wildfly - 阿奎利安 : use different port(s) for the managed WildFly container than a normal WildFly process,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32560358/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com