3 Replies Latest reply on Jun 7, 2010 12:42 AM by Tien Le Quang

    problems with multiple HornetQ instances in the same machine

    Francesco Formizzi Newbie

      Hi, I've a problem to create a cluster of multiple instances in the same machine.

       

      Here the steps I followed:

       

      1) I installed HornetQ 2.0.0GA under JBoss 4.2.3GA, launching $HORNETQ_HOME\config\jboss-as\ant as4

      2) under $JBOSS_HOME\server I copied the directory "all-with-hornetq"  I renamed in "all-with-hornetq2". (I've 2 server, the first is "all-with-hornetq", the second is "all-with-hornetq2").

      3) in the file   $JBOSS_HOME\server\all-with-hornetq\conf\jboss-service.xml I added this:

       

        <mbean code="org.jboss.services.binding.ServiceBindingManager"
           name="jboss.system:service=ServiceBindingManager">
           <attribute name="ServerName">ports-01</attribute>
           <attribute name="StoreURL">${jboss.home.url}/docs/examples/binding-manager/sample-bindings.xml</attribute>
           <attribute name="StoreFactoryClassName">
             org.jboss.services.binding.XMLServicesStoreFactory
           </attribute>
         </mbean>

       

      4)  I do the same thing in  $JBOSS_HOME\server\all-with-hornetq2\conf\jboss-service.xml, setting ServerName to ports-02:

             <attribute name="ServerName">ports-02</attribute>

       

      5) port-01 and ports-02 are correctly configured in sample-binding.xml (default configuration), so I didn't modify this file.

       

      6) I changed the values of netty-connector and netty-acceptor ports:

           first instance: port 5445

           second instance: port 5545

       

      7) I launched the first instance wiht the command:

           ./run.sh -c all-with-hornetq -b=10.212.150.37 -Djboss.partition.name=mypart -Dhornetq.remoting.netty.host=10.212.15.37

      My IP address is obviously 10.212.150.37

       

      8) I launched the second instance wiht the command:

           ./run.sh -c all-with-hornetq2 -b=10.212.150.37 -Djboss.partition.name=vmypart -Dhornetq.remoting.netty.host=10.212.15.37

       

       

      The second instance doesn't work, and I've a lot of this log message:

      WARN  [DiscoveryGroupImpl] There seem to be more than one broadcasters on the network broadcasting the same node id

       


      If I launch only one instance everything works perfectly. No problems if the instance is the second.

      If I do the same operations in two different machines, everything works perfectly (without step 2-3-4-5-6, I changed only ip address).

       

      Where I wrong??