users@glassfish.java.net

Re: Cluster doesn't replicate session

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Tue, 28 Jul 2009 21:46:04 -0700

Hi gsong

The logs show the following : *
*Starting Sun Java System Application Server* 9.1_02 (build b04-fcs) *...|*
*
That's an older release and given that a lot more bugs have been fixed
in the latest v2.1 release, I'd recommend you move to v2.1 b60e (one
more caveat coming up on that below).

The v2.1 b60e release build has a replication bug that affects 2
instance clusters. That has since been fixed and a patch given to
subscription customers, and the fix integrated into the v2.1.1
workspace. The bug impacts 2 instance cluster replication so you will
need a 3 instance cluster with v2.1 release bits, or pick up the latest
v2.1.1 promoted builds.

 From a diagnostic point of view, your logs show that the machines,
although said to be on the same subnet, have a possible problem with
multicast traffic.

In the instance_gf1_1-server.log, the instances server and
instance_gf1_1 are listed in the GMS view fairly early on. Presumably
these are on the same machine. This instance began its start operation
at *10:46:26*

[#|2009-07-29T*10:46:30*.468+0800|INFO|sun-appserver9.1|ShoalLogger|_ThreadID=14;_ThreadName=ViewWindowThread;|GMS
View Change Received: Members in view (before change analysis) are :
1: MemberId: server, MemberType: SPECTATOR, Address:
urn:jxta:uuid-33D33BAA278249EE8BB3BFA9C65FDFBB2DE658F932AB436995B78E0CB3E080DA03
2: MemberId: instance_gf1_1, MemberType: CORE, Address:
urn:jxta:uuid-33D33BAA278249EE8BB3BFA9C65FDFBBA16CD181C81E44F890BC853BFEDD0C7503


On the second log, there is only one member in the GMS group for a
really long time: (this instance began its start operation at *10:41:25 **)

*[#|2009-07-29T*10:41:33*.625+0800|INFO|sun-appserver9.1|ShoalLogger|_ThreadID=14;_ThreadName=ViewWindowThread;|GMS
View Change Received: Members in view (before change analysis) are :
1: MemberId: instance_gf1_4, MemberType: CORE, Address:
urn:jxta:uuid-33D33BAA278249EE8BB3BFA9C65FDFBBBD96296F2F914BF495AACF83C2440F3603
|#]

It takes about *12 minutes *to discover the DAS spectator server.
[#|2009-07-29T*10:53:43*.812+0800|INFO|sun-appserver9.1|ShoalLogger|_ThreadID=14;_ThreadName=ViewWindowThread;|GMS
View Change Received: Members in view (before change analysis) are :
1: MemberId: server, MemberType: SPECTATOR, Address:
urn:jxta:uuid-33D33BAA278249EE8BB3BFA9C65FDFBB2DE658F932AB436995B78E0CB3E080DA03
2: MemberId: instance_gf1_4, MemberType: CORE, Address:
urn:jxta:uuid-33D33BAA278249EE8BB3BFA9C65FDFBBBD96296F2F914BF495AACF83C2440F3603
|#]

The instance_gf1_1 is not discovered as a GMS member indicating a
multicast messaging problem.

Please look into the following FAQ entry for any diagnosis for future :
http://wiki.glassfish.java.net/Wiki.jsp?page=FaqBasicMulticastTestBetweenMachines
listed under the user FAQ located here :
http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishUserFAQ

Hope this helps.

Shreedhar


gsong wrote:
> I have been reading alot on how to set up glassfish cluter and I think I have
> did everything suggested on the instructions, but I'm still can't get thte
> cluster session replication working.
> I have two server and created one instance on each server. I create a
> cluster and deployed the clusterjsp.ear which get from the
> "$glassfish\samples\quickstart\clusterjsp' on the cluster, and it's seems
> that the session replication never working but it worked when i deploy the
> two instance both on one mache.
>
> test page of instance_gf1_1:
> ===================
> Cluster - HA JSP Sample
> HttpSession Information:
> Served From Server: 10.248.98.97
> Server Port Number: 8081
> Executed From Server: CN-PC-HZ2095
> Served From Server instance: instance_gf1_1
> Executed Server IP Address: 10.248.66.107
> Session ID: 46b356b3efb160833d8eac67358a
> Session Created: Wed Jul 29 10:51:16 CST 2009
> Last Accessed: Wed Jul 29 10:51:16 CST 2009
> Session will go inactive in 1800 seconds
>
> --------------------------------------------------------------------------------
>
> Data retrieved from the HttpSession:
> gf1_1key = gf1_1value
>
> test page of instance_gf1_4:
> =============================================
> Cluster - HA JSP Sample
> HttpSession Information:
> Served From Server: 10.248.98.97
> Server Port Number: 8081
> Executed From Server: CN-PC-HZ2248
> Served From Server instance: instance_gf1_4
> Executed Server IP Address: 10.248.66.48
> Session ID: 466af566ca715019afc3ec30a812
> Session Created: Wed Jul 29 10:46:19 CST 2009
> Last Accessed: Wed Jul 29 10:46:19 CST 2009
> Session will go inactive in 1800 seconds
>
> --------------------------------------------------------------------------------
> Data retrieved from the HttpSession:
> gf1_4key = gf1_4value
>
> after stop the insance_gf1_4: noticed that the sessionid is difference from
> previously
> ====================================
> HttpSession Information:
> Served From Server: 10.248.98.97
> Server Port Number: 8081
> Executed From Server: CN-PC-HZ2095
> Served From Server instance: instance_gf1_1
> Executed Server IP Address: 10.248.66.107
> Session ID: 4741c0b1946e71c27fd585d80225
> Session Created: Wed Jul 29 11:00:59 CST 2009
> Last Accessed: Wed Jul 29 11:00:59 CST 2009
> Session will go inactive in 1800 seconds
>
> ps:
> 1.All servers in the same subnet
> 2.avaliable enabled for the application;
> attached are logs of the two instance.
> This problem have troubled me for several days, appreciate for anyone gives
> suggesions!
> http://www.nabble.com/file/p24711649/instance_gf1_1-server.log
> instance_gf1_1-server.log
> http://www.nabble.com/file/p24711649/instance_gf1_4-server.log
> instance_gf1_4-server.log
>