title: Could not connect to http-remoting - Maven-Wildfly plugin
body: <p>I am attempting to employ the functionality of Deploying to Wildfly 9 in my build process with the Wildfly-Maven plugin. I am unable to deploy the application, due to the following error.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Please see the attached portion of my pom.xml.</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0.2.Final&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;username&gt;admin&lt;/username&gt;
                  &lt;password&gt;password&lt;/password&gt;
                  &lt;hostname&gt;127.0.0.1&lt;/hostname&gt;
                  &lt;name&gt; InspiralWeb-1.0-SNAPSHOT.war&lt;/name&gt;
                  &lt;jbossHome&gt;C:\Wildfly\wildfly-9.0.1.Final&lt;/jbossHome&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;install&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;deploy&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>There is no offset for the port in the standalone.xml, so I am sure the port that the management socket binding is on 9990, which is what is expected. It isn't clear if this is an issue with my setup or some network issue, I am running this locally also(as you can probably tell by the hostname). </p>
  
  <p>Thoughts anyone?</p>
  
  <p>Please see the attached Stacktrace</p>
  
  <pre><code>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
  </code></pre>