8 Replies Latest reply on Mar 5, 2004 9:47 AM by pdg

    Clustering on two different machine(Jboss 3.2.3)

    gugusamchil

      Hello,
      I want to clustering on two different machines (it is called S1,S2)

      on S1, The following file is corrected.
      1. cluster-service.xml modified
      2. farm-service.xml modified
      Similarly S2 is corrected.

      and JBOSS was started(S1,S2) and the screen which inputted http://localhost:8080 by the browser appears perfectly.
      s1 is dropped and http://localhost:8080 is inputted by the browser once again.
      But a screen does not look right.

      Since the cluster was carried out to S2 even if S1 falls, I thought that a screen looked right.

      Was my idea wrong?

      on S1 of log
      ------------------------------------
      2004-02-23 05:21:53,126 INFO [org.jboss.ha.framework.server.ClusterPartition] Set the JGroups logging to log4j with category:org.apache.log4j.Logger@a51027, priority: DEBUG, JGroupsLevel: 4
      2004-02-23 05:21:53,296 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Initializing
      2004-02-23 05:21:53,346 DEBUG [LocalPartition:ReplicantManager] registerRPCHandler
      2004-02-23 05:21:53,346 DEBUG [LocalPartition:ReplicantManager] subscribeToStateTransferEvents
      2004-02-23 05:21:53,346 DEBUG [LocalPartition:ReplicantManager] registerMembershipListener
      2004-02-23 05:21:53,767 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is pdskm-lee:2760 (additional data: 17 bytes)
      -------------------------------------------------------
      2004-02-23 05:21:55,900 INFO [org.jboss.ha.framework.server.ClusterPartition] Starting channel
      2004-02-23 05:21:55,900 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Number of cluster members: 1
      2004-02-23 05:21:55,900 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Other members: 0
      ........
      2004-02-23 05:25:44,138 INFO [org.jboss.ha.framework.interfaces.HAPartition.lifecycle.LocalPartition] New cluster view (id: 1, delta: 1) : [192.168.1.59:1099, 192.168.1.63:1099]
      2004-02-23 05:25:44,218 INFO [LocalPartition:ReplicantManager] Dead members: 0
      2004-02-23 05:25:46,161 DEBUG [LocalPartition:ReplicantManager] _add(HAJNDI, 192.168.1.63:1099
      ------------------------------------

      on S2 of log
      ------------------------------------
      2004-02-23 05:25:34,633 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Initializing
      2004-02-23 05:25:34,713 DEBUG [LocalPartition:ReplicantManager] registerRPCHandler
      2004-02-23 05:25:34,713 DEBUG [LocalPartition:ReplicantManager] subscribeToStateTransferEvents
      2004-02-23 05:25:34,713 DEBUG [LocalPartition:ReplicantManager] registerMembershipListener
      2004-02-23 05:25:35,304 INFO [STDOUT]
      -------------------------------------------------------
      GMS: address is jw-hong:3065 (additional data: 17 bytes)
      -------------------------------------------------------
      2004-02-23 05:25:37,687 INFO [org.jboss.ha.framework.server.ClusterPartition] Starting channel
      2004-02-23 05:25:37,697 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Number of cluster members: 2
      2004-02-23 05:25:37,707 INFO [org.jboss.ha.framework.interfaces.HAPartition.LocalPartition] Other members: 1
      .......
      ------------------------------------

      please, help me!!!

        • 1. Re: Clustering on two different machine(Jboss 3.2.3)
          nshashidhara

          Hi,

          I am shashidhara, new to clustering concept.
          can you help me .

          I am making use of jboss3.2.3 on two servers (s1 and s2)
          and deployed application on both servers , servers are identiying in cluster mode.
          I only included True tag in jboss.xml,
          I don't no what to configure in cluster-service.xml , please kindly help me urgent

          Doubts

          * Need to configure all servers IP address in cluster-service.xml
          * How request transfer to another server
          Ex: This is url
          http://www.help.com
          This ip address is configured to some IPaddress, if that machine itsself down
          how request goes to another server.

          please provide answer for these doubts.

          Regards
          Shashi

          nshashidhara@rediffmail.com

          • 2. Re: Clustering on two different machine(Jboss 3.2.3)
            xsantana

            Hi shashidhara,

            >I don't no what to configure in cluster-service.xml , please kindly help me urgent
            >Doubts

            >* Need to configure all servers IP address in cluster-service.xml

            As far as I know, the only thing you should configure in cluster-service.xml is the multicast IP address the jboss servers should use to communicate each other.

            >* How request transfer to another server

            You should use a web server as a front-end (I use apache) with module mod_jk. This module allows you to load-balance request to your N jboss servers.
            If one of the jboss servers falls, mod_jk will redirect all requests to the one that's still alive.

            If the server where Apache is running dies, you won't be able to access your application (unless you access directly to the other server with the tomcat port). I suppose you could run apache on both servers and use some kind of rotatory DNS service (I'm not sure that's possible, I'm just guessing) in order to redirect the requests to ' http://www.help.com' to any of the two apache servers.

            I'm not an expert in jboss, in fact I'm also hoping someone can help me with my last post, but I hope that helps.

            Xavier

            • 3. Re: Clustering on two different machine(Jboss 3.2.3)
              gsureshbabu


              Hi
              I am Suresh Babu
              Sub: probelms to implment jboss clustering

              We have been trying to implement Jboss clustering on two machines.we got only progress those two nodes are appearing in clustering. Two nodes are in Default Partition. we did not change any in jboss cluster-service.xml file.

              Changes made for configuration

              1.farm-service.xml in server/all/deploy
              2.For EJBs execution we made "clustered true" in ejb-jar.xml.

              Errors Identified :

              1. we tried to exceute from one node ,the client & jar files which are deployed in the
              second(second node shutdown) but it was giving me error as JNDI name not bound.
              We thought this one we r not getting HotDeployment.
              2.we tried with
              java.naming.url.provider=node1:1100,node2:1100
              in all/sever/conf/jndi.properties file at this one we got Communication Exception
              (SocketTimeoutException)
              i.e node1:1100 is not connected & node2:1100 is not connected

              3. In the client
              p.put(Context.PROVIDER_URL, ""); at this point we got
              javax.naming.CommunicationException: Receive timed out. Root exception is
              java.net.SocketTimeoutException
              at java.net.PlainDatagramSocketImpl.receive(Native Method)
              at java.net.DatagramSocket.receive(DatagramSocket.java:629)
              at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1093)
              at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1223)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
              at javax.naming.InitialContext.lookup(InitialContext.java:350)
              at ejb.HelloWorldClient.main(HelloWorldClient.java:31)
              Exception: Receive timed out

              We Supposed to put localhost:1100 or 1099 it is excuting in that particular node.

              Kindly inform me what r the chnages required to configure two systems.
              if you have any expmple code snipets forward to me.
              which is the best documentation for Jboss clustering?
              if we done any mistakes you will notice to me.


              Thanks &Regards

              G.Suresh Babu
              gsureshbabu9@rediffmail.com

              • 4. Re: Clustering on two different machine(Jboss 3.2.3)
                slaboure

                1) NEVER change all/sever/conf/jndi.properties
                2) can you test a telnet on port 1100 to check if it works?
                3) are you sure you run the all config i.e. "run -c all"

                • 5. Re: Clustering on two different machine(Jboss 3.2.3)
                  gsureshbabu

                  hi slaboure
                  thank you for your reply.

                  i have tesed >telnet 1100
                  result is : Connecting To 1100... Could not open a connection to host on port 23 : Connect failed.

                  I have been running my both jboss servers always with
                  run -c all

                  is there any modifications inform me ?
                  Regards
                  G.suresh Banu

                  • 6. Re: Clustering on two different machine(Jboss 3.2.3)
                    belaban

                    That's

                    telnet localhost 1100, not

                    telnet 1100 !

                    Bela

                    • 7. Re: Clustering on two different machine(Jboss 3.2.3)
                      gsureshbabu

                      hi Bela
                      i have tested with telnet localhost 1100
                      then iam getting this message. we are using windows 2000 for both jboss & clinent.
                      we got this one at our two severs are running on different nodes ,those ip addresses are 198.168.8.116 from this i tested telnet and another ine 198.168.8.117.
                      kindly give me procedure to solve this problem.

                      ¼φsr↓java.rmi.MarshalledObject|╜▲ùφcⁿ>☻♥I♦hashlocBytest☻[BobjBytesq~☺xp~
                      ¡≤ur☻[B¼≤↨°Tα☻xpB¼φthttp://gsureshbabu:8083/q~q~q~q~q~q~q~uq~♥♥D¼φs}☻↓org.jnp.interfaces.Naming,org.jboss.ha.framework.interfaces.HARMIProxyxr↨java.lang.reflect.Proxyß'┌ ╠►C╦☻☺L☺ht%Ljava/lang/reflect/InvocationHandler;xpsr-org.jboss.ha.framework.interfaces.HARMIClientε⌡δj√╡┘æ♥♥LfamilyClusterInfot5Lorg/jboss/ha/framework/interfaces/FamilyClusterInfo;L♥keyt↕Ljava/lang/String;LloadBalancePolicyt5Lorg/jboss/ha/framework/interfaces/LoadBalancePolicy;xpw↓↨DefaultPartition/HAJNDIsrjava.util.ArrayListxü╥↔Ö╟a¥♥☺I♦sizexp☻w♦☻sr2org.jboss.ha.framework.server.HARMIServerImpl_Stub☻☻xrjava.rmi.server.RemoteStubΘ■▄╔ïße☻xr∟java.rmi.server.RemoteObject╙a┤æ
                      a3▲♥xpw8
                      192.168.8.11Γ♥ºq♠√¶Xj⌐Çxsq~ UnicastRef2
                      w8
                      192.168.8.117♦π☻w6╜√¶X«ÇxxεOsr,org.jboss.ha.framework.interfaces.RoundRobinx.┼ßε:☻xpx

                      Connection to host lost.

                      Thanks
                      suresh

                      • 8. Re: Clustering on two different machine(Jboss 3.2.3)
                        pdg

                        Hi,

                        I am doing exactly the same test , and have the same problems, except:
                        The problems do only on high load (creating with 30 threads at the same time InitialContext's).
                        When I do it with one or two threads, no problem at all!

                        Did you find a solution already?