3 Replies Latest reply on Jul 18, 2003 6:54 AM by ged

    Tomcat Session Replication

    lmadrigal

      Hi All,
      Im having some problems while configuring session replication under tomcat, i hope you guys can help me out.

      scenario:
      Jboss 3.2.1 (build: CVSTag=JBoss_3_2_1 date=200305041533
      Apache Tomcat/4.1.24-LE-jdk14 (embedded)

      I have 3 nodes, all of them running linux
      Each node has:

      Apache/1.3.27 and mod_jk/1.2.4

      The workers file (same on all):

      worker.node1.port=8009
      worker.node1.host=x.x.x.91
      worker.node1.type=ajp13
      worker.node1.lbfactor=1
      worker.node1.local_worker=0
      worker.node1.cachesize=10

      worker.node2.port=8009
      worker.node2.host=x.x.x.92
      worker.node2.type=ajp13
      worker.node2.lbfactor=1
      worker.node2.local_worker=0
      worker.node2.cachesize=10

      worker.node3.port=8009
      worker.node3.host=x.x.x.108
      worker.node3.type=ajp13
      worker.node3.lbfactor=1
      worker.node3.local_worker=0
      worker.node3.cachesize=10

      worker.loadbalancer.type=lb
      worker.loadbalancer.balanced_workers=node1, node2, node3
      worker.loadbalancer.sticky_session=0
      worker.loadbalancer.local_worker_only=0
      worker.list=loadbalancer


      The same war app under deploy/ (actually directory.war)
      set on web.xml

      Jboss running with -c, configured for instant SnapShotMode

      Load balance works, also HA-JNDI and a couple of entity and stateless session beans (unfer farm/)

      i've read the entire paid documentation for clustering and followed closely the directions with no luck.

      But no matter how many files i've changed i cant have session replication on the nodes. If one of the nodes adds something to the session, the other ones cant see the new object.


      Any help will be greatly appreciated.

      --Leo

        • 1. Re: Tomcat Session Replication
          ged

          Hello. I really know what you're going through since I have the same problem myself. =(

          I have almost gotten session replication to work, but only in windows. I setup JBoss as 2 local instaces and let it run on 2 different ports on the same windows machine and it works with a small testprogram called ClusterTest.war. However with a bigger application it doesn't work, you get logged out when one of the nodes is taken down.

          Now my question... how did you get Clustering to work in Linux? I have 2 linux machines and they insist on not finding each other. However, if I bring (computer nr 3) my windows machine up, all the machines find each other, but not just the two linux machines alone. Really strange. What did I miss in my Linux installation?

          I have disabled firewalls.

          I have added routes with this command: "route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0".

          You can browse and dl files from both ofthem. No problems there.

          The version is Mandrake 9.1. They are using JBoss 3.2.1. Java version is j2sdk1.4.1_03.

          Regards,
          Daniel

          • 2. Re: Tomcat Session Replication
            ged

            Hello again.
            I've done some additional testing with a JavaGroups demo program and ethereal. And the problem seems to be that the linux computers can send multicast packets without problems, but they can _not_ recieve them.

            Any ideas why this hapens? And how do I cure my computers?

            Regards,
            Daniel

            • 3. Re: Tomcat Session Replication
              ged

              Hello.
              Finally I have found the roots of the evil lurking in my system. The villain was an innocent looking little flag called allmulti. To get my JBoss instaces to see each other in linux I issued the following command:

              # ifconfig eth0 allmulti

              Then they found each other. Don't be fooled by the MULTICAST flag in the ifconfig output. If it doesn't work just enter the line above and ifconfig should show:

              UP BROADCAST RUNNING ALLMULTI MULTICAST

              Ohh, I'm so happy! This will be celebrated with a coffee.
              Regards,
              Daniel