How do I correctly configure HTTP session replication?
johk Aug 12, 2010 8:03 AMEnvironment
Apache 2.2 + mod_proxy
jBoss 5.1
Ubuntu Server
jBoss parameters
/usr/local/jboss/bin/run.sh -c all -b 195.188.148.230 -u 233.3.4.5 -g foo &
/usr/local/jboss/bin/run.sh -c all -b 195.188.148.232 -u 233.3.4.5 -g foo &
Detail
I'm having trouble getting HTTP session replication working. I have created a cluster with two nodes on separate machines and configured a shared multicast address and group name. The servers seem to be detecting each other and joining the cluster:
11:52:42,233 INFO [foo] New cluster view for partition foo (id: 1, delta: 1) : [195.188.148.232:1099, 195.188.148.230:1099]
11:52:42,236 INFO [foo] I am (195.188.148.232:1099) received membershipChanged event:
11:52:42,237 INFO [foo] Dead members: 0 ([])
11:52:42,238 INFO [foo] New Members : 1 ([195.188.148.230:1099])
11:52:42,238 INFO [foo] All Members : 2 ([195.188.148.232:1099, 195.188.148.230:1099])
11:52:52,092 INFO [GroupMember] org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@2c31da got new view [195.188.148.232:46104|1] [195.188.148.232:46104, 195.188.148.230:55809], old view is [195.188.148.232:46104|0] [195.188.148.232:46104]
11:52:52,092 INFO [GroupMember] I am (195.188.148.232:46104)
11:52:52,092 INFO [GroupMember] New Members : 1 ([195.188.148.230:55809])
11:52:52,092 INFO [GroupMember] All Members : 2 ([195.188.148.232:46104, 195.188.148.230:55809])
I am deploying the same EAR file to both nodes via JMX (using the Maven jBoss plugin). The EAR contains a WAR file and the web.xml file contains the <distributable/> element. The WAR is mounted at the '/cc7-latest' context.
When I connect to one of the nodes a session is created as expected. Checking the host=localhost,path=/cc7-latest,type=Manager JMX bean (via jmx-console) for the first node the 'ReplicationStatistics' property has a value like:
[sessionID: 60JoDvnKRVd98nwd-swWdA__, replicationCount=1, minPassivationTime=0, maxPassivationTime=0, totalPassivationTime=0, minReplicationTime=7, maxReplicationTime=7, totalReplicationlTime=7, loadCount=0, minLoadTime=9223372036854775807, maxLoadTime=0, totaLoadlTime=0];)
The second node only has the value ) (ie no sessions).
Also, on both nodes the config=standard-session-cache,jmx-resource=RPCManager,service=Cache JMX bean reports the property 'ReplicationCount' to be 0.
Question
Any ideas why replication might not be happening?