3 Replies Latest reply on Mar 4, 2004 10:36 AM by ddhf78

    problem with master node selection

    ddhf78

      Hi, I am working with a HA JMS version delivered with JBoss3.2.3 distribution on the linux system. I have got some problems with master node in my cluster. My environment is very simple: a cluster with 2 nodes, when I start my first node in the cluster, this node is selected as master node, but when I start the second node, the second one becomes the new master node. As a result, all the previous connections of my application which has been deployed on the first node are disconnected. I want to know why the master node changed when a new node joins the cluster ? is it a problem of configuration ? have I any way to control the selection of master node ? thanks for any help,suggestions...

      mlu

        • 1. Re: problem with master node selection
          belaban

          The 2nd node doesn't find the first one, so it thinks it is the first node and becomes Singleton. Use the basic tests in JGroups to ensure the 2 members find each other.
          Bela

          • 2. Re: problem with master node selection
            ddhf78

            The 2nd node sees well the 1th node, the cluster nodes work well together except the singleton server for JBossMQ switched from the 2nd to the 1th node when the 2nd started. Do you know what is the algorithm for master node selection ? does a new election start each time the cluster topology changes (ex. a new node joins the cluster) ?
            thanks in advance
            mlu

            • 3. Re: problem with master node selection
              ddhf78

              I made a mistake in my previous description of problem: the singleton server for JMS not changed when the 2th node joind the cluster. But the 1th node received a remote notification (a new servive HAILSharedState started) when the 2th joind and closed previous connections. Here are the stack traces of the 1th node when it received the notification and closed the previous connections.
              org.jboss.mq.il.uil2.UILServerIL.connectionClosing(UILServerIL.java:345)
              2004-03-04 15:52:16,575 ERROR [STDERR] at org.jboss.mq.il.ha.HAILServerIL.handleNotification(HAILServerIL.java:249)
              2004-03-04 15:52:16,575 ERROR [STDERR] at org.jboss.mx.server.NotificationListenerProxy.handleNotification(NotificationListenerProxy.java:69)
              2004-03-04 15:52:16,575 ERROR [STDERR] at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:93)
              2004-03-04 15:52:16,576 ERROR [STDERR] at org.jboss.ha.jmx.HAServiceMBeanSupport._receiveRemoteNotification(HAServiceMBeanSupport.java:339)
              2004-03-04 15:52:16,576 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              2004-03-04 15:52:16,576 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              2004-03-04 15:52:16,576 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              2004-03-04 15:52:16,577 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
              2004-03-04 15:52:16,577 ERROR [STDERR] at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:392)
              2004-03-04 15:52:16,577 ERROR [STDERR] at org.jboss.ha.framework.server.HAPartitionImpl.handle(HAPartitionImpl.java:722)
              2004-03-04 15:52:16,577 ERROR [STDERR] at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:536)
              2004-03-04 15:52:16,577 ERROR [STDERR] at org.jgroups.blocks.RequestCorrelator.access$100(RequestCorrelator.java:35)
              2004-03-04 15:52:16,578 ERROR [STDERR] at org.jgroups.blocks.RequestCorrelator$Request.run(RequestCorrelator.java:752)
              2004-03-04 15:52:16,578 ERROR [STDERR] at org.jgroups.util.ReusableThread.run(ReusableThread.java:208)
              2004-03-04 15:52:16,578 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)


              and the content of the notification is:
              javax.management.AttributeChangeNotification: source=jboss.mq:service=HAILSharedState seq-no=2 time=1078411936478 message=HAILSharedState started attributeName=State attributeType=java.lang.Integer oldValue=2 newValue=3 notificationType=jmx.attribute.change userData=null



              now my question is why the notification of HAILSharedState state changed from "starting" to "started" make the 1th node to close previous connection and is these a way to avoid it ?

              thanks for your help.

              mlu