Forums

Home » Liferay Portal » English » 6. Portal Framework »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jason Czerak
Glassfish clustering does not work.
June 25, 2008 11:00 AM
Answer

Jason Czerak

Rank: New Member

Posts: 23

Join Date: May 1, 2008

Recent Posts

I have what I believe to be all the correct settings to achieve a cluster with glassfish, however, I can not maintain session state. In a nut shell, one or to clicks in once you login, your are then directed to the login page.

I know glassfish is functioning correctly, the "clusterjsp" .ear file works correctly. However, when I add in to the .war file in the sun-web.xml and web.xml files the <distributable/>, check the "availability" flag. The sessions fails to stay working correctly.

Is there anything else? What .xml files from glassfish can I post here to ensure the configuration is accurate?

I have a DAS on one server, and each clustered pair is on a separate server.


Ideas?
Jason Czerak
RE: Glassfish clustering does not work.
June 25, 2008 11:22 AM
Answer

Jason Czerak

Rank: New Member

Posts: 23

Join Date: May 1, 2008

Recent Posts

If I drop one of the clustered servers, everything is fine.

When accessing Liferay, I'm going directly to the app server, not via the LB.

portal.domain.com = Load Balanacer

server1.domain.com
server2.domain.com

So if I'm on server1.domain.com/web/guest/, I still get dropped sessions!!! if I drop server2.domain.com, everything is stable until server2 comes back up.
Raju Uppalapati
RE: Glassfish clustering does not work.
June 25, 2008 2:15 PM
Answer

Raju Uppalapati

Rank: Junior Member

Posts: 66

Join Date: October 24, 2007

Recent Posts

What kind of LB are you using (Apache mod_jk). The LB should be doing Sticky balancing.
"Sticky load balancing" describes the act of distributing user requests across a set of servers in such a way that requests from a given user are consistently sent to the same server.

Second think to look for is are both the server clocks in sync. There should not be a mismatch in the server clocks.
We are also trying to setup a similar configuration inhouse. So will publish info as soon as we get to this phase.

It could be an issue with cookies as well. Can you try modifying the cookiePath to "/" and redeploy the WAR file on both nodes.
Also make sure you redeploy WAR file after every change instead of modifing in a the deployed area.

*** /opt/work/sun-web.xml Wed Jun 25 14:08:51 2008
--- /opt/work/liferay/portal-web/docroot/WEB-INF/sun-web.xml Fri May 30 14:28:07 2008
***************
*** 3,13 ****

<sun-web-app>
<context-root>/</context-root>
+ <session-config>
+ <cookie-properties>
+ <property name="cookiePath" value="/"/>
+ </cookie-properties>
+ </session-config>
<resource-ref>
<res-ref-name>jdbc/LiferayPool</res-ref-name>
<jndi-name>jdbc/LiferayPool</jndi-name>
--- 3,8 ----

thanks,
_raju
Jason Czerak
RE: Glassfish clustering does not work.
June 26, 2008 6:16 AM
Answer

Jason Czerak

Rank: New Member

Posts: 23

Join Date: May 1, 2008

Recent Posts

Well, it appears to be working "better" but what really sucks is, if I drop a server, the users on that server, their sessions are dropped. This is not what I would call "clustering".

if I update data on one server vs another, like announcements and what not for example, those changes work as expected.
Raju Uppalapati
RE: Glassfish clustering does not work.
June 26, 2008 6:42 AM
Answer

Raju Uppalapati

Rank: Junior Member

Posts: 66

Join Date: October 24, 2007

Recent Posts

So the HTTP session is not getting replicated between the cluster instances.
Can you let me know the LB you are using?

The updates to data in the database like annoucments, message boards etc will be picked up by all clustered instances because they are all talking to the same database.

thanks,
_raju
Ajit Kamble
RE: Glassfish clustering does not work.
July 25, 2008 9:28 PM
Answer

Ajit Kamble

Rank: New Member

Posts: 0

Join Date: May 20, 2008

Recent Posts

Below LEP has been created for the same
http://support.liferay.com/browse/LEP-6894