Issue Details (XML | Word | Printable)

Key: GLASSFISH-12322
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: vijaysr
Reporter: easarina
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
glassfish

App not getting deployed to a multi-machine cluster

Created: 21/Jun/10 04:45 PM   Updated: 26/Aug/10 07:06 PM   Resolved: 26/Aug/10 07:06 PM
Component/s: admin
Affects Version/s: 3.1
Fix Version/s: 3.1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: Sun


Issuezilla Id: 12,322
Tags:
Participants: arungupta, easarina, Hong Zhang and vijaysr


 Description  « Hide

Solaris 10 Sparc, Glassfish 3.1 b05. On two machines I've created a cluster
that has two instances, one instance per a machine. Ten I've deployed an
application to the cluster. The application was deployed successfully and was
available through a browser for both instances. But during the deployment was
seen the follow error message and the command was reported as failed
=============================================
asadmin deploy --target c1 webapps-caching.war
remote failure: An error occurred during replication
Command _deploy executed successfully on server instance in1
Command _deploy executed successfully on server instance in2
Command deploy executed successfully on server instance in1
Command deploy failed on server instance in2 : remote failure: Error during
deployment : Application with name webapps-caching is already registered. Either
specify that redeployment must be forced, or redeploy the application. Or if
this is a new deployment, pick a different name.

echo $?
1

=====================================================

Really nothing was deployed to in2 before.



Hong Zhang added a comment - 21/Jun/10 05:42 PM

Does this only happen when you set up one instance per machine? Can you try to
see if you can reproduce the same problem if you set up two instances on the
same machine?
I only have one machine so hoping I can just look into the problem without
having to find another machine..


easarina added a comment - 21/Jun/10 06:35 PM

I did not see this issue with two clustered instances on one machine.


Hong Zhang added a comment - 21/Jun/10 06:44 PM

I see. And it can be reproduced consistently when instances are on different
machines with freshly installed build?


easarina added a comment - 21/Jun/10 06:50 PM

I have a script that installed build on two machines and configured a cluster
with two instances. When the issue was seen first time, I've reinstalled
everything, deployed an app to the fresh installation and saw the issue again.
So it reproduceable consistently.


Hong Zhang added a comment - 22/Jun/10 05:38 AM

Vijay actually saw the same error message yesterday, he later told me he forgot
to set the ENABLE_REPLICATION variable for one of the terminals when he ran
commands. In your case, is this flag set for the two nodes where the cluster
instances are started, and also where the command is run to deploy the
application?


Hong Zhang added a comment - 28/Jun/10 09:31 AM

Arun saw the same issue when he tried with multiple machine set up.
It might be issue on command replication framework or even lower level. The
deployment code does not do anything special w.r.t single machine or multiple
machine. Assign to Vijay to take an initial look.


arungupta added a comment - 06/Jul/10 02:18 PM

My 2-instance cluster setup is described at:

http://blogs.sun.com/arungupta/entry/ttod_142_glassfish_3_1

Deploying a trivial web app consisting of one JSP + one Servlet gives the
following error:

– cut here –
ubuntu@ip-10-160-142-175:~$ echo $ENABLE_REPLICATION
true
ubuntu@ip-10-160-142-175:~$ asadmin deploy --target food MySimpleApp.war
[#|2010-06-26T00:12:46.635+0000|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=106;_ThreadName=http-thread-pool-4848(5);|MySimpleApp
was successfully deployed in 1,409 milliseconds.|#]

[#|2010-06-26T00:14:29.516+0000|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=103;_ThreadName=http-thread-pool-4848(2);|Application
with name MySimpleApp is already registered. Either specify that redeployment
must be forced, or redeploy the application. Or if this is a new deployment,
pick a different name.
java.lang.Exception: Application with name MySimpleApp is already registered.
Either specify that redeployment must be forced, or redeploy the application. Or
if this is a new deployment, pick a different name.
at
org.glassfish.deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:491)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:230)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:324)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:339)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:987)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:94)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1110)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1099)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:367)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:113)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:803)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:706)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:987)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:217)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:526)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:507)
at java.lang.Thread.run(Thread.java:619)

#]

[#|2010-06-26T00:14:29.517+0000|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=103;_ThreadName=http-thread-pool-4848(2);|Error
during deployment : Application with name MySimpleApp is already registered.
Either specify that redeployment must be forced, or redeploy the application. Or
if this is a new deployment, pick a different name. |#]

remote failure: An error occurred during replication
Command _deploy failed on server instance broccoli : remote failure: An error
occurred during replication
Command _deploy failed on server instance broccoli : remote failure: An error
occurred during replication
Command _deploy failed on server instance broccoli : remote failure: An error
occurred during replication
Command _deploy failed on server instance broccoli : remote failure: An error
occurred during replication
Command _deploy failed on server instance broccoli : java.net.SocketException:
Unexpected end of file from server
Command _deploy failed on server instance spinach : remote failure: File not
found : /home/ubuntu/glassfishv3/glassfish/domains/domain1/config/MySimpleApp.war

Command _deploy failed on server instance apple : I/O Error
Command _deploy failed on server instance banana : I/O Error
Command _deploy failed on server instance orange : I/O Error

Command _deploy failed on server instance spinach : remote failure: File not
found : /home/ubuntu/glassfishv3/glassfish/domains/domain1/config/MySimpleApp.war

Command _deploy failed on server instance apple : I/O Error
Command _deploy failed on server instance banana : I/O Error
Command _deploy failed on server instance orange : I/O Error

Command _deploy failed on server instance spinach : remote failure: File not
found : /home/ubuntu/glassfishv3/glassfish/domains/domain1/config/MySimpleApp.war

Command _deploy failed on server instance apple : I/O Error
Command _deploy failed on server instance banana : I/O Error
Command _deploy failed on server instance orange : I/O Error

Command _deploy failed on server instance spinach : remote failure: File not
found : /home/ubuntu/glassfishv3/glassfish/domains/domain1/config/MySimpleApp.war

Command _deploy failed on server instance apple : I/O Error
Command _deploy failed on server instance banana : I/O Error
Command _deploy failed on server instance orange : I/O Error

Command _deploy executed successfully on server instance spinach
Command _deploy executed successfully on server instance apple
Command _deploy executed successfully on server instance banana
Command _deploy executed successfully on server instance orange
Command deploy failed on server instance broccoli : remote failure: Error during
deployment : Application with name MySimpleApp is already registered. Either
specify that redeployment must be forced, or redeploy the application. Or if
this is a new deployment, pick a different name.

Command deploy executed successfully on server instance spinach
Command deploy failed on server instance apple : remote failure: Error during
deployment : Application with name MySimpleApp is already registered. Either
specify that redeployment must be forced, or redeploy the application. Or if
this is a new deployment, pick a different name.

Command deploy failed on server instance banana : remote failure: Error during
deployment : Application with name MySimpleApp is already registered. Either
specify that redeployment must be forced, or redeploy the application. Or if
this is a new deployment, pick a different name.

Command deploy failed on server instance orange : remote failure: Error during
deployment : Application with name MySimpleApp is already registered. Either
specify that redeployment must be forced, or redeploy the application. Or if
this is a new deployment, pick a different name.

Command deploy failed.
– cut here –

Bumping the priority higher as this is a basic usecase and should be working.

Also changing the subject from "An error message during the deployment to the
clustred instance." to the new one to make it more meaningful and searchable.


vijaysr added a comment - 26/Aug/10 07:06 PM

As part of our scalability testing, we just tested deploying a small app as well as a 5MB app on a cluster
with 50 instances spread across 4 nodes.Deployment went through fine. Let me know if the problem
persists in your environment.