Http session replication not happening in clustered environm
vivekoswal Aug 3, 2004 6:42 AMHi all,
We are setting up a cluster of servers, the specifications are as follows:
OS: Windows 2000 Professional
JDK: jdk1.3.1_04
JBoss version: jboss-3.2.1_tomcat-4.1.24 (on 2 nodes viz server1 and server2.)
Apache: 2.0.45(installed on server1)
We have included
<distributable/>element in the web.xml of our application
similarly we have included entries for all the entity beans and session beans in jboss.xml's of all the components.
We have added the jvmRoute attribute in the {JBOSS_HOME}\server\all\deploy\jbossweb-tomcat.sar\META-INF\jboss-service.xml file
of both the nodes
server1 <Engine jvmRoute="server1" name="MainEngine" defaultHost="localhost"> server2 <Engine jvmRoute="server2" name="MainEngine" defaultHost="localhost">
We have included the following tag in the {JBOSS_HOME}\server\all\deploy\wsc.ear\wsc.war\jboss-web.xml file of both the nodes.
<replication-config>
<replication-trigger>SET_AND_GET</replication-trigger>
<replication-type>SYNC</replication-type>
</replication-config>
APACHE mod_jk2 specific Configuration is as follows:
Following lines are added at the end of {apache_home}\conf\httpd.conf file
# Include mod_jk's specific configuration file
Include conf/mod-jk2.conf
# Load mod_jk module
LoadModule jk2_module modules/mod_jk2.so
Following are the content of {apache_home}\conf\workers2.properties file.
[shm]
info=Scoreboard. Requried for reconfiguration and status with multiprocess servers.
file=anon
size=1048576
[lb:lb]
stickySession=1
debug=1
[channel.socket:server1:8009]
port=8009
host=server1
tomcatId=server1
[channel.socket:server2:8009]
port=8009
host=server2
tomcatId=server2
[ajp13:server1:8009]
channel=channel.socket:server1:8009
group=lb
[ajp13:server2:8009]
channel=channel.socket:server2:8009
group=lb
[uri:/*]
group=lb
[status:]
info=Status worker, displays runtime information
Following are the content of {apache_home}\conf\mod-jk2.conf file
<IfModule mod_jk2.c> JkSet config.file C:/Program Files/Apache Group/Apache2/conf/workers2.properties </IfModule>After making the above configurations the load balancing behaviour was achieved but the session replication does'nt seem to be happening.
We started both the nodes and observed that the cluster of 2 nodes is formed. Then we made a request which went to server1. We shut down the jboss-tomcat at server1 and made a request with the same client, we expected that server2 would take the charge (session will be replicated on server2) but it does not happen and we get a session expired message.
We would appreciate any help and suggestions on this.
Thanks and regards.
popnet.