Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4955

Tomcat Clustering via Uni Cast doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4, 2.2
    • 2.1.5
    • Clustering
    • Security Level: public (Regular issues)
    • None
    • Patch Available

    Description

      Below is a senario:
      1.Install geronimo 2.2 on two machines,namely 9.186.10.60(NODE02),9.186.10.89(NODE03).

      2.Configure Apache http server.
      (1)add mod_jk.so to ApacheHttpServer_HOME/modules.
      (2)add or modify workers.properties under ApacheHttpServer_HOME/conf like
      worker.list=loadbalancer,status
      worker.maintain=60

      worker.NODE02.port=8009
      worker.NODE02.host=9.186.10.60
      worker.NODE02.type=ajp13
      worker.NODE02.lbfactor=1

      worker.NODE03.port=8009
      worker.NODE03.host=9.186.10.89
      worker.NODE03.type=ajp13
      worker.NODE03.lbfactor=1

      worker.loadbalancer.type=lb
      worker.loadbalancer.balance_workers=NODE02,NODE03
      worker.loadbalancer.sticky_session=1
      worker.status.type=status
      (3)add information below to ApacheHttpServer_HOME/conf/

      LoadModule jk_module modules/mod_jk.so

      JkWorkersFile conf/workers.properties

      JkLogFile logs/mod_jk.log

      JkLogLevel debug

      JkMount /* loadbalancer

      3.
      For NODE02:

      (1)Modify GERONIMO_HOME/var/config/config-substitutions.properties
      ClusterNodeName=NODE02
      (2)Modify GERONIMO_HOME/var/catalina/server.xml.
      <Engine name="Catalina" defaultHost="${ServerHostname}" jvmRoute="NODE02" >

      For NODE03:
      (1)Modify GERONIMO_HOME/var/config/config-substitutions.properties
      ClusterNodeName=NODE03
      (2)Modify GERONIMO_HOME/var/config/config.xml.
      <Engine name="Catalina" defaultHost="${ServerHostname}" jvmRoute="NODE03" >

      3.
      I tried two ways to enable unicast clustering..One is to enable it in config.xml and the other is to enable it in the deploy plan.

      (Deploy the ream.xml first cause we have security realm configuration in the application )

      The first way:(enable it in config.xml)
      On the two server,separately add GBean information under<module name="org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car">
      Refer to the attachment:node02ExcerptFromConfig.xml and node03ExcertFromConfig.xml
      Then deploy the application servlet-examples-cluster-server2.war using Simple simple-servlet-examples-cluster-plan2.xml as a deploy plan.
      deploy the application servlet-examples-cluster-server3.war using Simple simple-servlet-examples-cluster-plan3.xml as a deploy plan.

      The second way:(enable it in deploy plan)
      Without modification to config.xml,deploy the application directly.
      deploy the application servlet-examples-cluster-server2.war using servlet-examples-cluster-plan2.xml as a deploy plan.
      deploy the application servlet-examples-cluster-server3.war using servlet-examples-cluster-plan3.xml as a deploy plan.

      Expected:
      Session will be replicated .When node 02 fails,the node 03 will be the back up.and vice versa.

      But currently both way don't work, when node2 fails ,session is not replicated to node03

      Attachments

        1. servlet-examples-cluster-plan3.xml
          10 kB
          Lu Jiang
        2. servlet-examples-cluster-plan2.xml
          10 kB
          Lu Jiang
        3. simple-servlet-examples-cluster-plan2.xml
          2 kB
          Lu Jiang
        4. node03ExcerptFromConfig.xml.txt
          13 kB
          Lu Jiang
        5. node02ExcerptFromConfig.xml.txt
          14 kB
          Lu Jiang
        6. servlet-examples-cluster-server3.war
          71 kB
          Lu Jiang
        7. servlet-examples-cluster-server2.war
          71 kB
          Lu Jiang
        8. realm.xml
          2 kB
          Lu Jiang

        Activity

          People

            Unassigned Unassigned
            jessy Lu Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: