gpt4 book ai didi

wildfly - Arquillian - Wildfly 无法部署 test.war(无法连接到 http-remoting ://127. 0.0.1 :9990. 连接失败)

转载 作者:行者123 更新时间:2023-12-02 11:48:34 36 4
gpt4 key购买 nike

我正在尝试使用 Arquillian 和 Wildfly(8.1.0.Final 和 8.2.0.Final 测试)容器运行一个简单的 JPA 测试(持久化、读取、JSON 序列化),但直到现在我无法将 test.war 部署到嵌入式服务器。测试使用 Jboss 7.1.1.Final 容器运行。

  • 我使用了 Arquillian 入门指南和 Arquillian 示例项目(谷歌:github arquillian 教程)中提供的 arquillian-tutorial 包
  • 我使用了 Arquillian - Wildfly 配置给定 here

  • 您可以找到可下载的 project package on google drive .您可以在该包中看到 Maven 和 Arquillian 配置。我曾尝试使用或不使用管理领域凭据。关于个人资料 wildfy81-embedded-credentials (这是包中的默认设置),构建首先解压 wildfly 包,然后覆盖定义了管理员用户凭据和角色的 mgmt-users.properties 和 mgmt-groups.properties。

    异常(exception)是
    INFO  [org.jboss.ws.common.management] JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
    INFO [org.jboss.as] JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
    INFO [org.jboss.as] JBAS015951: Admin console listening on http://127.0.0.1:9990
    INFO [org.jboss.as] JBAS015874: WildFly 8.1.0.Final "Kenny" started in 3401ms - Started 184 of 233 services (81 services are lazy, passive or on-demand)
    INFO [org.xnio] XNIO version 3.2.0.Beta4
    INFO [org.xnio.nio] XNIO NIO Implementation Version 3.2.0.Beta4
    INFO [org.jboss.remoting] JBoss Remoting version 4.0.3.Final
    ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 0a93e136 to /127.0.0.1:9990
    ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
    ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 084cf5d6 to /127.0.0.1:9990
    ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
    WARN [org.jboss.as.arquillian.container.ArchiveDeployer] Cannot undeploy: test.war: org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper$ServerDeploymentException: java.lang.RuntimeException: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
    at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:109) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.arquillian.container.ArchiveDeployer.undeploy(ArchiveDeployer.java:55) [wildfly-arquillian-common-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.arquillian.container.CommonDeployableContainer.undeploy(CommonDeployableContainer.java:152) [wildfly-arquillian-common-8.1.0.Final.jar:8.1.0.Final]
    Caused by: java.lang.RuntimeException: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:103) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:50) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:106) [wildfly-controller-client-8.1.0.Final.jar:8.1.0.Final]
    ... 82 more
    Caused by: java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
    at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:117) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]

    你能帮我在这里找到问题吗?

    提前致谢。

    编辑 1

    来自 arquillian.xml
    <container qualifier="wildfly-embedded-credentials">
    <configuration>
    <property name="jbossHome">target/wildfly-8.1.0.Final</property>
    <property name="modulePath">target/wildfly-8.1.0.Final/modules</property>
    <property name="managementAddress">127.0.0.1</property>
    <property name="managementPort">9990</property>
    <property name="username">admin</property>
    <property name="password">admin</property>
    <property name="outputToConsole">true</property>
    </configuration>
    </container>

    部署代码:
    @Deployment
    public static WebArchive createDeployment() {
    return ShrinkWrap.create(WebArchive.class, "test.war")
    .addPackage(MyBean.class.getPackage())
    .addAsLibraries(new File("target/test-libs/commons-collections.jar"),
    new File("target/test-libs/flexjson.jar"))
    .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
    .addAsWebInfResource("jboss-ds.xml")
    .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    我想知道这是不是因为 URL
    INFO Http management interface listening on http://127.0.0.1:9990/management

    编辑 2

    在附加的项目(上面的谷歌驱动器链接)中,您会看到另一个配置文件 wildfy81-embedded 在具有不同 arquillian 配置的 pom.xml 中,我不提供管理地址或用户名和密码,只定义了 jbossHome 和 modulePath 文件夹。我得到同样的异常(exception)(同样的端口,9990)。
    <container qualifier="wildfly-embedded">
    <configuration>
    <property name="jbossHome">target/wildfly-8.1.0.Final</property>
    <property name="modulePath">target/wildfly-8.1.0.Final/modules</property>
    <property name="outputToConsole">true</property>
    </configuration>
    </container>

    在上次测试中,我注意到了另一个异常原因(可能是因为我在家使用的 java 版本或 eclipse 版本)。这是其他异常行底部的异常无法连接到 http-remoting://127.0.0.1:9990。连接失败
    Caused by: java.io.IOException: Invalid response
    at org.xnio.http.HttpUpgradeParser.parseVersion(HttpUpgradeParser.java:150) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.http.HttpUpgradeParser.parse(HttpUpgradeParser.java:53) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:299) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:279) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:531) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]
    at ...asynchronous invocation...(Unknown Source)
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:339) [jboss-remoting-4.0.3.Final.jar:4.0.3.Final]
    at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:78) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
    at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:109) [wildfly-protocol-8.1.0.Final.jar:8.1.0.Final]
    ... 95 more

    最佳答案

    由于 Windows 平台上的 Nvidia 驱动程序,我多次遇到此异常(无效响应部分)。 NVIDIA 网络服务使用的端口与 WildFly/JBoss AS 使用的端口相同。如果您使用的是带有 nvidia 的 windows,那么请转到本地服务并停止此服务,然后检查测试是否有效 :)。

    关于wildfly - Arquillian - Wildfly 无法部署 test.war(无法连接到 http-remoting ://127. 0.0.1 :9990. 连接失败),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32157820/

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