6 Replies Latest reply on Oct 31, 2011 12:56 PM by Wolf-Dieter Fink

    How to use JBoss 5.1 with Unicast

    Biswajit Sinha Newbie

      Hi All,

       

      Can anyone tell me if I need to specifically alter or make any changes for JBoss 5.1 to work with Unicast. I installed JBoss and ran multiple instances on separate ports in a cluster of 2 servers but I am seeing a typical posst office exception everytime I start JBoss.

       

      I am using JBoss 5.1 GA with JDK 1.6.0_21 on an RHEL 5.4 64 bit Linux machine with good amount of disk and memory.

       

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I DEPLOYMENTS MISSING DEPENDENCIES:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "**ERROR**")

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "**ERROR**")

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "**ERROR**")

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "**ERROR**")

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "**ERROR**")

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I DEPLOYMENTS IN ERROR:

      Thu 12:20:42 I [linuxhost1] Thu 12:20:42 I Deployment "jboss.messaging:service=PostOffice" is in error due to the following reason(s): java.lang.IllegalArgumentException: Cannot start post office since there is already a post office in the cluster with the same node id (1). Are you sure you have given each node a unique node id during installation?, **ERROR**

      Regards,

      Bis

        • 1. Re: How to use JBoss 5.1 with Unicast
          Wolf-Dieter Fink Master

          That looks not like an unicast/multicast problem.

          The cluster looks build, but you have both instances with a JMS instance. Here you need to set the identifier different for each.

          Add '-Djboss.messaging.ServerPeerID=<a number>' as parameter to run.sh, each instance with a different <number>.

          That should work for you.

          • 2. Re: How to use JBoss 5.1 with Unicast
            Biswajit Sinha Newbie

            I did try that as well but wasnt helpful, someone told me that to implement unicast with jboss 5.1 you'll need to make some changes to the cluster config as by default it uses multicast with UDP which needs to change to unicast with TCP or something which I am not entirely sure of.

            • 3. Re: How to use JBoss 5.1 with Unicast
              Wolf-Dieter Fink Master

              The error should be exact and point that teh cluster configuration detect two JMS instances with the same id.

              As it is your intention to have a cluster the two nodes must be started with a different PostOfficeId.

              It dosn't matter whether you use a different cluster communication, the result will be a cluster with the same error.

               

              Are you sure that you have no other JBoss instance in your network.

              How do you start the JBossß run.sh -c all [-b <IP> -p <partition name> -u <multicast ip> -m <multicast port>] ??

              the -p -u -m should avoid that an other (default) installation will join your cluster.

               

              You can check whether you have foreign members in the server.log, look for a messages like '* Members *'.

              • 4. Re: How to use JBoss 5.1 with Unicast
                Biswajit Sinha Newbie

                I run multiple JBoss instances on different ports on the same set of linux

                 

                servers as a cluster with my own directory structure. Here's the script for one which works fine with multicast and another which is problematic with unicast mentioned below:-

                 

                Multicast implemented Jboss instance

                 

                :-

                /bin/sh /opt/jboss/jboss-5.1.0.GA/bin/run.sh -Dmyjee.domain=mytest2 -Dmyjee.environment=integration -Dmyjee.serverIndex=1 -Djboss.server.base.dir=/opt/myjee/instances/mytest2 -Djboss.server.base.url=file:///opt/myjee/instances/mytest2 -b linuxhost1 -c integration/linuxhost1 -Djava.awt.headless=true -Djboss.tomcat.jvmRoute=mytest2-integration1 -Dmyjee.managed.server.hostname=linuxhost1 -Dmyjee.managed.server.port=12050 -Djboss.messaging.ServerPeerID=1 -Djboss.tomcat.connectionTimeout=90000 -Djboss.tomcat.maxThreads=40 -Djboss.tomcat.keepAliveTimeout=95000 -g mytest2-integration_Cluster -Djgroups.udp.ip_ttl=10 -u 10.200.178.52

                 

                Logs:-

                14:53:20,161 INFO  [ServerPeer] JBoss Messaging 1.4.3.GA server [1] started
                14:53:20,276 INFO  [STDOUT]
                ---------------------------------------------------------
                GMS: address is 10.85.104.140:56738 (cluster=MessagingPostOffice-CTRL)
                ---------------------------------------------------------
                14:53:22,287 INFO  [GroupMember] org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@5d3aa2b9 got new view [10.85.104.140:56738|0] [10.85.104.140:56738], old view is null
                14:53:22,287 INFO  [GroupMember] I am (10.85.104.140:56738)
                14:53:22,288 INFO  [GroupMember] New Members : 1 ([10.85.104.140:56738])
                14:53:22,288 INFO  [GroupMember] All Members : 1 ([10.85.104.140:56738])
                14:53:22,298 INFO  [STDOUT]
                ---------------------------------------------------------
                GMS: address is 10.85.104.140:7900 (cluster=MessagingPostOffice-DATA)
                ---------------------------------------------------------
                14:53:27,347 INFO  [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                14:53:27,349 INFO  [QueueService] Queue[queue/autoException] started, fullSize=200000, pageSize=2000, downCacheSize=2000
                14:53:27,350 INFO  [QueueService] Queue[queue/AuditLinkUnlink] started, fullSize=200000, pageSize=2000, downCacheSize=2000

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

                 

                (Unicast implemented Jboss instance):-

                /opt/jboss/jboss-5.1.0.GA/bin/run.sh -Dmyjee.domain=mytest1 -Dmyjee.environment=integration -Dmyjee.serverIndex=1 -Djboss.server.base.dir=/opt/myjee/instances/mytest1 -Djboss.server.base.url=file:///opt/myjee/instances/mytest1 -b linuxhost1 -c integration/linuxhost1 -Djava.awt.headless=true -Djboss.tomcat.jvmRoute=mytest1-integration1 -Dmyjee.managed.server.hostname=linuxhost1 -Dmyjee.managed.server.port=12000 -Djboss.messaging.ServerPeerID=1 -Djboss.tomcat.connectionTimeout=90000 -Djboss.tomcat.maxThreads=40 -Djboss.tomcat.keepAliveTimeout=95000 -Djboss.default.jgroups.stack=tcp -Djboss.jgroups.tcp.tcp_port=12025 -Djgroups.tcpping.initial_hosts=linuxhost1[12025] -Djgroups.bind_addr=linuxhost1

                 

                Logs:-

                12:51:58,211 INFO  [ServerPeer] JBoss Messaging 1.4.3.GA server [1] started
                12:51:58,328 INFO  [STDOUT]
                ---------------------------------------------------------
                GMS: address is 10.85.104.140:56649 (cluster=MessagingPostOffice-CTRL)
                ---------------------------------------------------------

                12:51:58,546 INFO [GroupMember] org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@3ef0642 got new view [10.85.96.7:56255|2175] [10.85.96.7:56255, 10.85.96.8:43253, 10.85.96.8:48118], old view is null

                12:51:58,546 INFO [GroupMember] I am (10.85.104.140:56649)

                12:51:58,547 INFO [GroupMember] New Members : 26 ([10.85.96.7:56255, 10.85.96.8:43253, 10.85.96.8:48118, 10.85.96.8:53108, 10.85.96.8:57875])

                12:51:58,547 INFO [GroupMember] All Members : 26 ([10.85.96.7:56255, 10.85.96.8:43253, 10.85.96.8:48118, 10.85.96.8:53108, 10.85.96.8:57875])

                12:51:58,896 INFO [STDOUT]

                 

                ---------------------------------------------------------
                GMS: address is 10.85.104.140:7900 (cluster=MessagingPostOffice-DATA)
                ---------------------------------------------------------
                12:52:00,686 ERROR [ExceptionUtil] org.jboss.messaging.core.jmx.MessagingPostOfficeService@4ceb0577 startService
                java.lang.IllegalArgumentException: Cannot start post office since there is already a post office in the cluster with the same node id (1). Are you sure you have given each node a unique node id during installation?
                        at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.start(MessagingPostOffice.java:372)
                        at org.jboss.messaging.core.jmx.MessagingPostOfficeService.startService(MessagingPostOfficeService.java:462)
                        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)

                 

                 

                • 6. Re: How to use JBoss 5.1 with Unicast
                  Wolf-Dieter Fink Master

                  As I said in my previous comment, the error

                  java.lang.IllegalArgumentException: Cannot start post office since there is already a post office in the cluster with the same node id (1). Are you sure you have given each node a unique node id during installation?

                  came only in the case if I have more than one JBoss instance with messaging with the same peerId (jboss.messaging.ServerPeerID=#).

                  There is no difference if I start with UPD or TCP.

                   

                  Take a fresh copy duplicate all and start with the option '-b host[12] -Djboss.messaging.ServerPeerID=[12]' this should work.

                  If not try to start the instance which fails without the other if it fails again look into your network for another JBoss.