users@glassfish.java.net

Http session data lost in replicated cluster on glassfish v2ur1-b09d

From: <glassfish_at_javadesktop.org>
Date: Fri, 08 Feb 2008 18:57:08 PST

Hi All,

I am having a strange issue with my glassfish cluster dropping my web application http session data when deployed using availability option. Here is my configuration:

Operating System:
[glassfish_at_dws-cmg1 ~]$ uname -a
Linux dws-cmg1 2.6.18-xen #1 SMP Fri May 18 16:01:42 BST 2007 x86_64 x86_64 x86_64 GNU/Linux

JVM:
[glassfish_at_dws-cmg1 ~]$ java -version
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b19, mixed mode)

Glassfish:
[glassfish_at_dws-cmg1 ~]$ ./bin/asadmin version
Unable to communicate with admin server, getting version locally.
Version = Sun Java System Application Server 9.1_01

I have properly installed and configured a two node cluster on the same subnet supporting full multicast communication. The availability service is set using all defaults from setup-cluster.xml, and my web application component's web.xml uses the <distributable /> tag. When I deploy my enterprise application using the availability flag, the application operates as expected for the first few requests and then suddenly the http session is lost on the initial node and I have not even attempted a failover test. The following details are pertinent:

1. This same behavior is observed even if I bypass our hardware load balancer and run the application from a single node. The http session data is completely lost after a few requests.
2. If I deselect the availability option disabling session replication and redeploy my enterprise application, the problem goes away.
3. I deployed a separate but simple lightweight web application using the availability option and tested the application. The problem of lost session data I observe with my enterprise application does not occur on either node. Moreover session failover for the lightweight web application works perfectly.

I conclude that there is an issue with http session replication for my enterprise application that is causing the session data to be lost, however I am unable to diagnose what the problem actually is. My enterprise application web component is using Stripes and the session data consists of two Java objects. One is a javax.crypto.spec.SecretKeySpec instance and the other is my user object which indicates that the user has logged in. Both instances are serializable, and my user object's serialization data is probably on the order of 5k.

Has anyone seen this kind of behavior, and if so, know where I might start in looking for an answer?
[Message sent by forum member 'jmetcalf' (jmetcalf)]

http://forums.java.net/jive/thread.jspa?messageID=258183