简体   繁体   中英

How do you deploy to JBoss EAP sitting within a running docker container using the jboss-as-maven-plugin?

I have adopted a number of maven projects, and would like to move from deploying them to a VM housing JBoss and a VM housing the Database, to a docker setup similar to this

However rather than copying the war across in the Dockerfile, we require to move it across to the running container using the jboss-as-maven-plugin as part of the maven lifecycle.

All things like open ports are sorted, as I'm able to access the database from the host.

At the moment I receive an error when trying to deploy the war.

[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (pre-integration-test) on project chess: Could not execute goal deploy on /var/lib/jenkins/jobs/Chess_Docker/workspace/target/Chess.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012174: Could not connect to http-remoting://127.0.0.1:35800. The connection failed: XNIO000812: Connection closed unexpectedly

Could anyone shed any light on what the problem is?

Many Thanks, Stuart

I've faced with the similar problem only with the jboss-cli. The problem was the different version of the used jboss-cli used for deploy and the target server's version.

Using the same version as the target server would solve the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM