11 Replies Latest reply on Aug 17, 2005 12:11 PM by Murali Ravipudi

    Cluster & MDB's

    rolfz Newbie

      I have got a simple queue and a MDB deployed in a cluster. I know they are not supported by the Jboss clustering but I should be able to deploy them without any errors. What happends is that after I added the 3rd node to the cluster I receive XAConnectionFactory not bound on the second node(see below).

      Regarding the Wiki I checked the RecursiveSearch flag as well as the jms-ha settings. All seem to be correct.

      To get around this problem I only deployed the projects with the MDBs on one node in the cluster, which is a work around but it defeats the purpose of the cluster !!

      I also tried to point the org.jboss.jms.jndi.JMSProviderLoader to the master node but with the same result.

      Is there anything else I can try ?

      System Config: 3.2.5 + W2K Server

      2004-09-27 04:01:49,663 WARN [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] javax.naming.NameNotFoundException: XAConnectionFactory not bound
      2004-09-27 04:01:49,763 WARN [org.jboss.ha.framework.interfaces.HAPartition.DefaultPartition] javax.naming.NameNotFoundException: queue not bound

        • 1. Re: Cluster & MDB's
          rolfz Newbie

          Any suggestion ?

          • 2. Re: Cluster & MDB's
            Scott Stark Master

            This warning is irrelevant and is expected non-homogeneous cluster deployment. Its coming from the HAJNDI server code, not client code doing the actual lookup. Its a message saying someone has asked for a JNDI binding that the node emitting the warning does not have. This would be one of the non-JMS server nodes. It really should be a debug level message, not a warning.

            • 3. Re: Cluster & MDB's
              rolfz Newbie

              Well the problem is that I can't lookup the XAConnectionFactory or ConnectionFactory on this node anymore and therefore it is not possible for me to send a message to a queue.
              There must be a better way of doing it ? Any help is very much appreciated


              • 4. Re: Cluster & MDB's
                Frank Sudkamp Newbie

                I am getting the exact same results using JBoss-3.2.5. I can get two instances woking on a single server or seperate servers in a clustered environment but a third instance on any server causes this warning to occur and the MDBs I deployed on the final instance to be unavailable.

                • 5. Re: Cluster & MDB's
                  rolfz Newbie

                  Did you find a solution/workaround for this problem yet ?

                  • 6. Re: Cluster & MDB's
                    Frank Sudkamp Newbie

                    I have not found a solution yet. Have you?

                    At this point we will probably use two server instances on two seperate boxes and any other instances we want will be consumers of the message queues managed by the original two instances.

                    If you hear of a solution...let me know. I'd like to get it corrected if possible.

                    • 7. Re: Cluster & MDB's
                      Christofer Dutz Newbie

                      Well I can't realy provide a solution, but I can confirm that this problem seems to still exist in JBoss 4.0.0.

                      Is there a JBoss Enterprise-Edition for more than 2-Node clusters available? ;)

                      One thing I might add ... don't know if it helps: I had to modify the hajndi-jms-ds.xml File and change "localhost:1100" to "local-machine-name:1100" otherwise I always got "connection refused" errors ... it seemed a little strange, but I didn't bother since it worked from here on (at least with 1 and two cluster nodes)

                      • 8. Re: Cluster & MDB's
                        Claus Kolb Newbie


                        when you look up a queue in a clustered HA-JMS-JBoss-setup you need to specify the hajndi-port in the PROVIDER_URL:
                        Properties props = new Properties();
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1100"); HA-JNDI-Port !!!
                        InitialContext ctx = new InitialContext(props);

                        I hope I remember this correctly because I cant look at the code right now.


                        • 9. Re: Cluster & MDB's
                          Rohan Talip Newbie


                          "chrisdutz" wrote:
                          Well I can't realy provide a solution, but I can confirm that this problem seems to still exist in JBoss 4.0.0.

                          Is there a JBoss Enterprise-Edition for more than 2-Node clusters available? ;)

                          I am not using a MDBs but I am using multiple distributed QueueReceivers, 3 for one queue, distributed across different JBoss servers/nodes running JBoss 4.0.1sp1.

                          I am seeing a similar problem.

                          The Warnings from DefaultPartition within > 2 node cluster topic (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=56835) mentions that the 'javax.naming.NameNotFoundException:ConnectionFactory not bound' seen in the logs is just a warning (and will eventually be changed into a debug).

                          I do see this warning in our JBoss logs, and for a while (i.e. many hours) nothing is read off the queue from the 3rd node, even though it is being read on the 1st and 2nd node (i.e. master and one non-master). Eventually the 3rd node will read messages off the queue, but that might just be because the other 2 nodes are busy processing messages.

                          I'm wondering if JBossMQ distributes the load evenly across multiple QueueReceivers or if it is just the first QueueReceiver to poll the master node (i.e. broker in ActiveMQ speak) that gets the message off the queue, hence leading to possible 'starvation'?

                          From what I have observed empirically, on our system the QueueReceiver on the master node gets more messages than the 2nd node, while the 3rd node doesn't get many messages.

                          Is this configurable? i.e. is there an attribute that can be set for some sort of round-robin delivery/receipt?

                          Thanks for any help.



                          • 10. Re: Cluster & MDB's
                            Murali Ravipudi Newbie

                            I configured MDBs to run off a queue in a cluster of JBoss instances (4.0.1sp1) for load balancing and notice a similar behaviour. The non-master nodes dont receive as many messages as the master node does. Starvation does not really bother my application, but it will be nice to share the load.

                            I could not find any option to configure round-robin kinda thing.

                            Any light on this please, anyone?


                            • 11. Re: Cluster & MDB's
                              Murali Ravipudi Newbie

                              I just found this - on configuring queue receivers in round-robin:


                              hope that helped.