Using cargo to deploy war to remote Jboss7 server
hai_feng Dec 10, 2013 8:55 PMHI,Everybody
I would like to use Cargo to deploy my maven generated war
file to a remote JBoss Server that is already running.
I have configured my pom.xml
like this:
<build> <finalName>cargo</finalName> <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>1.2.0</version> <configuration> <container> <containerId>jboss7x</containerId> <type>remote</type> </container> <configuration> <type>runtime</type> <properties> <cargo.hostname>192.168.7.128</cargo.hostname> <cargo.jboss.management.port>9999</cargo.jboss.management.port> <cargo.remote.username>jboss</cargo.remote.username> <cargo.remote.password>sn@12345</cargo.remote.password> </properties> </configuration> <!-- Deployer configuration --> <deployer> <type>remote</type> </deployer> <!-- Deployables configuration --> <deployables> <deployable> <groupId>com.*.cargo</groupId> <artifactId>cargo</artifactId> <type>war</type> <pingURL>http://192.168.7.128:8080/cargo</pingURL> <pingTimeout>60000</pingTimeout> </deployable> </deployables> </configuration> <dependencies> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-controller-client</artifactId> <version>7.1.0.Final</version> </dependency> </dependencies> </plugin> </plugins> </build>
If I run this with the maven command:
cargo:deploy
The eclipse console says:
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.0:deploy (default-cli) on project cargo: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.0:deploy failed: Cannot deploy deployable org.codehaus.cargo.container.jboss.deployable.JBossWAR[cargo.war]: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.7.128:9999. The connection timed out
On the running JBoss server I can see a logging message in the console like this:
22:57:25,400 ERROR [org.jboss.remoting.remote.connection] (Remoting "localhost:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Connection reset by peer
Does anybody have an idea what could be wrong or how I could get more debug info from cargo to find out what exactly the problem is?
Thanks!