Hornetq Live / Backup server issue with JAS6
saifeldeen Jun 19, 2012 12:10 AMG'day,
I have the following setup:
- JAS 6 using HornetQ 2.2.5 Primary 1 - P1
- JAS 6 using HornetQ 2.2.5 Primary 2 - P2
- JAS 6 using HornetQ 2.2.5 Failover 1 - F1
- JAS 6 using HornetQ 2.2.5 Failover 2 - F2
I deploy my EAR to the "deploy" directory in P1 and F1. My EAR contains a single EJB and the EJB contains a reference to a queue resource "queue/testQueue". P1 starts up perfectly fine. F1 doesn't. The EAR doesn't deploy correctly and the following message is logged:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss-injector:topLevelUnit=testQ.ear,unit=test.jar,bean=QueueInsert" is missing the following dependencies:
Dependency "<UNKNOWN jboss-injector:topLevelUnit=testQ.ear,unit=test.jar,bean=QueueInsert>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-switchboard:appName=testQ,module=test,name=QueueInsert' **")
Deployment "jboss-switchboard:appName=testQ,module=test,name=QueueInsert" is missing the following dependencies:
Dependency "queue/testQueue" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'queue/testQueue' **")
Deployment "jboss.j2ee:ear=testQ.ear,jar=test.jar,name=QueueInsert,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:ear=testQ.ear,jar=test.jar,name=QueueInsert,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss-injector:bean=QueueInsert,topLevelUnit=testQ.ear,unit=test.jar' **")
Deployment "jboss.j2ee:ear=testQ.ear,jar=test.jar,name=QueueInsert,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=testQ.ear,jar=test.jar,name=QueueInsert,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss-injector:topLevelUnit=testQ.ear,unit=test.jar,bean=QueueInsert>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-switchboard:appName=testQ,module=test,name=QueueInsert' **
Deployment "queue/testQueue" is in error due to the following reason(s): ** NOT FOUND Depends on 'queue/testQueue' **
Deployment "<UNKNOWN jboss.j2ee:ear=testQ.ear,jar=test.jar,name=QueueInsert,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss-injector:bean=QueueInsert,topLevelUnit=testQ.ear,unit=test.jar' **
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]
It seems that F1 cannot find the queue configuration, even though it is there in the hornetq-jms.xml.
However, when I remove <backup>true</backup> from F1's hornetq-configuration, the primary / failover nodes behave perfectly fine. That is, I can stop P1 and F1 will behave as a backup should behave (i.e. take control), I can then stop F1 and P1 will then take control etc...
I have attached the configuration for P1, P2, F1 and F2 if it helps (without <backup>true</backup> in the failover nodes) and also my EAR file. I am starting my JBoss instances as follows:
# primary 01
run.bat -c node1 -g DocsPartition -u 239.255.100.100 -b 192.168.1.35 -Djboss.messaging.ServerPeerID=1 -Djboss.service.binding.set=ports-default
# primary 02
run.bat -c node2 -g DocsPartition -u 239.255.100.100 -b 192.168.1.35 -Djboss.messaging.ServerPeerID=2 -Djboss.service.binding.set=ports-01
# failover 01
run.bat -c node1-backup -g DocsPartition -u 239.255.100.100 -b 192.168.1.35 -Djboss.messaging.ServerPeerID=3 -Djboss.service.binding.set=ports-02
# failover 02
run.bat -c node2-backup -g DocsPartition -u 239.255.100.100 -b 192.168.1.35 -Djboss.messaging.ServerPeerID=4 -Djboss.service.binding.set=ports-03
My questions are:
- When I follow the doco, i.e. use <backup>true</backup> in the failover nodes, why doesn't the EAR get deployed and why does the failover node not function correctly? Are developers required to deploy to deploy-hasingleton rather than the deploy directory?
- If I don't use <backup>true</backup> in the failover nodes, are there any ramifications? As I said earlier, the primary / failover nodes work perfectly this way...