-
15. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
connie.yang Nov 1, 2012 9:20 PM (in response to jamezp)Do jboss-as:redeploy and jboss-undeploy work? I just tried it and it doesn't seem to work with 7.3.Final nor 7.4.Final-SNAPSHOT.
In case it was not clear, I've trying to get this to work on a standalone deployment setup. So far, I've been using the standalone.xml from the zip and the command line below.
mvn jboss-as:redeploy -Djboss-as.hostname=<remote-host-name> -Djboss-as.username=<management-realm-user> -Djboss-as.password=<management-realm-password> -Djboss-as.deployment.filename=<war-name> -Djboss-as.deployment.targetDir=<path-to-my-war> -Ddeploy.force=true
I've tried it with and without the -Ddeploy.force.
It seems that the plugin will not attempt to pick up a newer version of the war when it detects that the war already exists.
-
16. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
louis_j Dec 13, 2012 3:05 AM (in response to connie.yang)Hi
Did you find a solution for this problem? I am currently battling with exactly the same problem where a deploy of an application which is already running on a remote server hangs at
Authenticating against security realm: ManagementRealm
-
17. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
nickarls Dec 13, 2012 3:14 AM (in response to louis_j)Which AS version? Are you deploying with a maven plugin of the same version? Can you get a jstack dump showing where it hangs?
-
18. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
louis_j Dec 13, 2012 3:16 AM (in response to nickarls)I'm running JBOSS EAP 6 and I'm using jboss-as-maven-plugin 7.3.Final. Got the same problem with jboss-as-maven-plugin 7.1.1.Final
-
19. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
louis_j Dec 13, 2012 3:23 AM (in response to louis_j)It looks like deployment hanged because there was an error during initialization of my Spring application context.
Found some errors in the Jboss server.log, and after fixing it the application deploys fine. -
20. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
atiyou Jan 11, 2013 6:15 AM (in response to nickarls)Hi ,
As i didn't fount a jenkins plugin that could deploy to JBOSS EAP 6 ,i found this maven plugin to do it durring install phase...
So I have the same issue as Connie described bellow, but first i would like to mention that JBOSS is located at the same machine (i don't have to do remote deploy..)
I started my jboss like this :
jboss@devsaa:~/domain/bin> ./domain.sh -Djboss.address.management=10.69.57.96 -D jboss.bind.address=10.69.57.96 My plugin configuration is like this :
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.3.Final</version>
<configuration>
<host>10.69.57.96</host>
<port>9999</port>
<name>jboss</name>
<password>passpass</password>
<domain>
<server-groups>
<server-group>main-server-group</server-group>
</server-groups>
</domain>
</configuration>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
But i got this error :
11 janv. 2013 11:53:26 hudson.maven.ExecutedMojo <init>
WARNING: Failed to getClass for org.jboss.as.plugin.deployment.Deploy
mojoStarted org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)
[INFO]
[INFO] --- jboss-as-maven-plugin:7.3.Final:deploy (default) @ foo-foundation-webapp ---
11 janv. 2013 11:53:27 org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
11 janv. 2013 11:53:27 org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
11 janv. 2013 11:53:27 org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GAmojoFailed org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)
projectFailed fr.foo.foundation:foo-foundation-webapp:1.0-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.717s
[INFO] Finished at: Fri Jan 11 11:53:33 CET 2013
[INFO] Final Memory: 72M/120M
[INFO] ------------------------------------------------------------------------
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{
"address" => [],
"operation" => "read-attribute",
"name" => "launch-type" }'.
cause : Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153
..........................
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
.............................
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
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.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:181) ... 35 morechannel stopped
Finished: FAILURESo even when i mention the host address 10.69.X.X i see in the log file Could not connect to remote://localhost:9999 !
At this moment, i just want to make simple deploy in the same machine
Thanks for feedback i'm very stuck
-
21. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
nickarls Jan 14, 2013 1:39 AM (in response to atiyou)Isn't it jboss.bind.address.management?
(please start a new thread if you still have problem)
-
22. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
atiyou Jan 14, 2013 6:15 AM (in response to nickarls)Yes, it is the ip of the same machine from where i launch the build , and i cannot deploy my war it even when i do not mention host, user, and the password !
what did you mean by "start a new thread " ?
-
23. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
nickarls Jan 14, 2013 6:21 AM (in response to atiyou)You said you started the AS with
jboss@devsaa:~/domain/bin> ./domain.sh -Djboss.address.management=10.69.57.96 -D...
I mentioned you might want to try
jboss@devsaa:~/domain/bin> ./domain.sh -Djboss.bind.address.management=10.69.57.96 -D...
And by a new thread I mean a new forum thread. This is an old thread.
-
24. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
atiyou Jan 14, 2013 6:50 AM (in response to nickarls)Yes you're rigth, sorry
i dit it whell ./domain.sh -Djboss.bind.address.management=adr -Djboss.bind.address=adr and not ./domain.sh -Djboss.address.management=adr
So OK, i will create new thread
Thank's
-
25. Re: How to deploy a WAR to AS 7.1.1-Final running on a remote endpoint?
apanag Sep 25, 2013 5:34 PM (in response to connie.yang)Hi,
I had the same problem JBAS012144 as I installed a fresh JBoss 7.1 on my OSX. I was trying to deploy a war locally using jboss as maven plugin.
Exception:
JBAS012144: Could not connect to remote://localhost:9999. The connection timed out...
The problem was that the JBoss AS plugin was trying to deploy to localhost but the address was 127.0.0.1.
Have a look at your JBoss Console:
23:12:19,475 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
Initially I had no configuration in the plugin, then I added the hostname and finally the war was properly deployed
<build> <plugins> <plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.4.Final</version> <configuration> <hostname>127.0.0.1</hostname> </configuration> <executions> <execution> <phase>install</phase> <goals> <goal>deploy</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
As I tried to reproduce the error message, in order to put in the forum, I removed the configuration and hostname tag. Very weirdly the plugin managed to deploy even without them...Probably it was to do with name resolution, or whatever...
Anyway, I hope it helps.