Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.4, 2.2
-
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