我试图在Wildfly-Maven插件的构建过程中使用部署到Wildfly 9的功能。由于以下错误,我无法部署应用程序。
2015-08-29 15:24:55,720 ERROR [org.jboss.remoting.remote.connection] (XNIO-1 I/O-1) JBREM000200: Remote connection failed: java.io.IOException: An existing connection was forcibly closed by the remote host
请参阅我的pom.xml的附件部分。
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.0.2.Final</version>
<configuration>
<username>admin</username>
<password>password</password>
<hostname>127.0.0.1</hostname>
<name> InspiralWeb-1.0-SNAPSHOT.war</name>
<jbossHome>C:\Wildfly\wildfly-9.0.1.Final</jbossHome>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
standalone.xml中的端口没有偏移量,所以我确定管理套接字绑定的端口是9990,这是预期的。我不清楚这是我的设置或某些网络问题,我也在本地运行(你可以通过主机名告诉)。
有人想到吗?
请参阅随附的Stacktrace
Caused by: java.io.IOException: java.net.ConnectException: JBAS012174: Could not connect to remote://127.0.0.1:9990. The connection failed
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
at org.wildfly.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:245)
... 27 more
Caused by: java.net.ConnectException: JBAS012174: Could not connect to remote://127.0.0.1:9990. The connection failed
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:117)
at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:148)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
... 29 more
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:708)
at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:339)
at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:78)
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:109)
... 39 more
答案 0 :(得分:0)
我不是百分之百确定为什么,必须以这种方式完成,但在我开始以域模式运行而不是独立运行之后它开始工作。
eckes所说的也是如此,&#34;不确定&#34;必须启用&#34; (本机API端点与主机控制器或独立服务器位于同一位置。要使用CLI,必须启用它。默认情况下,它在端口9999上运行)在docs.jboss.org/author/display/WFLY8中/ ...意思是。尝试telnet到9999并使用jboss-cli。&#34;
更重要的是,我必须通过CLI连接到localhost:9999。这似乎使得我可以使用maven-wildfly插件进行远程部署。
似乎仍然存在一些连接问题,因为它似乎总是在安装阶段初始部署失败,并且构建战争。所以我承认这根本不是最佳解决方案。
我没有抨击standalone.xml与domain.xml,看看Wildfly 9独立模式下默认情况下是否禁用某些内容,与域模式相比。
答案 1 :(得分:0)
问题的原因可能是以下之一:
127.0.0.1 localhost
:: 1 localhost