users@glassfish.java.net

Glassfish clustering problems

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 May 2010 11:52:33 PDT

For the last week or so I've been working to get my application running with Glassfish clustering. I've had some issues getting it going but now I'm very close. I'm using Apache 2.2 to do the load balancing of 2 nodes. Both nodes are running Ubuntu 9.10. One is running in VirtualBox on the same machine as the other.

I'm using Apache mod proxy to do the URL rewriting and load balancing, and it all works up to a point.

What happens is, in the middle of running my application, I'm given a new session for no reason at all. This happens intermittently. So I can log in, I see the URLs getting rewritten, and I see from the instance logs that both instances are being used for requests. Then while traversing around my app a GET request returned from the server gives me a Set-Cookie with a new JSESSIONID. On this request I see my request coming into Apache on port 80, Apache ACKing, the request being sent over to a server on it's port, the server ACKing, then the HTTP 302 comes back with a new JSESSIONID which ends my session, and work.

Has anyone seen this issue before or have any clues?

This will also happen if I disable one node through Apache's balancer-manager so all traffic is just going to one node. It also happens if I set up sticky sessions.

Any insight is appreciated. I'm almost at the point of giving up on Glassfish clustering.
[Message sent by forum member 'doal']

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