Remote deploy on more than one cluster glassfish return error

370 views
Skip to first unread message

Waller Maciel

unread,
May 4, 2015, 6:39:02 PM5/4/15
to codehau...@googlegroups.com
Return message Application XXX is referenced by more than one targets. Please remove other references or specify all targets (or domain target if using asadmin command line) before attempting undeploy operation.

How resolve this issue?

Waller M

unread,
May 4, 2015, 6:56:58 PM5/4/15
to codehau...@googlegroups.com
See pom.xml:

 <plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.14</version>
<configuration>
<container>
<containerId>glassfish3x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.runtime.args>--target domain --force</cargo.runtime.args>
<cargo.hostname>${glassfish.host}</cargo.hostname>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>${glassfish.pwd}</cargo.remote.password>
<cargo.remote.port>8080</cargo.remote.port>
<cargo.glassfish.target>cluster1,cluster1</cargo.glassfish.target>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>/${context}</context>
</properties>
</deployable>                                
</deployables>                            
</configuration>
<dependencies>
<dependency>
<groupId>org.glassfish.deployment</groupId>
<artifactId>deployment-client</artifactId>
<version>3.1.1</version>
</dependency>
</dependencies>
</plugin>

S. Ali Tokmen

unread,
May 5, 2015, 4:11:58 PM5/5/15
to codehau...@googlegroups.com
Hi Waller

This is an interesting question, how do you normally achieve this with asadmin commands? We could then reverse engineer what to enter :)

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
On 05/05/15 00:56, Waller M wrote:
Return message Application XXX is referenced by more than one targets. Please remove other references or specify all targets (or domain target if using asadmin command line) before attempting undeploy operation.

How resolve this issue?

--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/790c1d6e-31c8-4cfa-954e-7c69eb48080d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Waller M

unread,
May 5, 2015, 5:04:03 PM5/5/15
to codehau...@googlegroups.com
Hi Ali!

Simple, just run:

$ asadmin deploy --contextroot $ CONTEXT_NAME --name $ CONTEXT_NAME --target domain --force $ FILE

Thanks!

S. Ali Tokmen

unread,
May 6, 2015, 4:13:14 PM5/6/15
to codehau...@googlegroups.com
Hi Waller

I am confused - Your error message is about undeploy, while the command is about deploy... Is this normal?

Please advise and provide further details on what you are trying to achieve and what exact commands you are running.

Waller Maciel

unread,
May 6, 2015, 4:20:51 PM5/6/15
to codehau...@googlegroups.com
When is used the deploy command with parameter "--force", the asadmin provided a redeploy truly in the domain and clusters over domain.

You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/2E8yosT0PLA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/554A75D4.9050008%40alishomepage.com.

S. Ali Tokmen

unread,
May 6, 2015, 4:38:25 PM5/6/15
to codehau...@googlegroups.com
Hi Waller

Thanks, and can you please explain what Cargo commands you are executing? Step by step would be appreciated, so I can and understand the problem.

Regards

From: Waller Maciel
Sent: ‎06/‎05/‎2015 22:20
To: codehau...@googlegroups.com
Subject: Re: [codehaus-cargo] Re: Remote deploy on more than one clusterglassfish return error

Waller Maciel

unread,
May 6, 2015, 4:47:40 PM5/6/15
to codehau...@googlegroups.com
1. I am trying to conduct a remote deploy on a server with multiple clusters glassfish3
2. For this, the parameters used:
<cargo.runtime.args> force = true </cargo.runtime.args>
<cargo.glassfish.target> cluster1, cluster2, cluster3 </cargo.glassfish.target>
3. In maven command line is "cargo:redeploy"
4. However, when you run redeploy, the plugin can not remove and re-deploy the application on the mentioned clusters, generating error messages mentioned in other post.

So I make an analogy, because the command via shell script supports the "--target domain" and the plugin does not support?

S. Ali Tokmen

unread,
May 7, 2015, 1:47:28 AM5/7/15
to codehau...@googlegroups.com
Hi Waller

OK, now I get your point :) We actually have the solution to your question, as explained in https://codehaus-cargo.github.io/cargo/Glassfish+4.x.html (scroll down to Deployer Features): The Glassfish installed deployer allows for additional deployment and undeployment arguments by adding properties prefixed with GlassFishPropertySet.DEPLOY_ARG_PREFIX (i.e. cargo.glassfish.deploy.arg.) and GlassFishPropertySet.UNDEPLOY_ARG_PREFIX (i.e. cargo.glassfish.undeploy.arg.) respectively followed by a number starting at 1.

So, I guess you can use these to add any required arguments.

Hope this helps
Reply all
Reply to author
Forward
0 new messages