Foros de discusión

session.shared.attributes not working in cluster

Gunta Dalecka, modificado hace 10 años.

session.shared.attributes not working in cluster

New Member Mensajes: 4 Fecha de incorporación: 7/11/13 Mensajes recientes
When trying to configure cluster using Liferay 6.1.2 CE, I fail to get session replication working. Tried also setting up cluster with Terracota following step-by-step described in how-do-i-cluster-liferay-with-terracotta, but it looks, that session.shared.attributes setting in portal-ext.properties is ignored. How to get it working?

Are there any fresh guidelines on setting up cluster suitable for Liferay 6.1.2 CE available? Whitepaper "Advanced Liferay Architecture-Clustering and High Availability" is pretty old and Ehcache configuration changes have been since then. Is cluster with session replication using CE possible at all?

I experimented also with EE trial, but I didn't see any cluster/cache/terracota related plugins in spite I've read in forums about it.
thumbnail
Juan Gonzalez, modificado hace 10 años.

RE: session.shared.attributes not working in cluster

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
I Gunta,

your problem probably it's caused by a misconfiguration of your app server cluster. Depending on which server are you using, you should do different operations.

For example. these are the instructions for enabling in Tomcat:

http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html#Cluster_Basics
Gunta Dalecka, modificado hace 10 años.

RE: session.shared.attributes not working in cluster

New Member Mensajes: 4 Fecha de incorporación: 7/11/13 Mensajes recientes
Juan,
thanks for your soon answer. Yes, I am using Liferay bundled with Tomcat.
I'm familiar with this article, but will go through it once again.

Do you mean, that it should be possible to get session replication working with Community Edition Liferay bundled with Tomcat?

From forums I see people got it working with Liferay 6.0, but I'm not so sure about Liferay 6.1.2, that I am using.
thumbnail
Juan Gonzalez, modificado hace 10 años.

RE: session.shared.attributes not working in cluster

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Gunta Dalecka:

Do you mean, that it should be possible to get session replication working with Community Edition Liferay bundled with Tomcat?


Of course! I tried it some weeks ago, and guess it was using a just-pre-6.1.2-sources, so it should work.

First you can try the session replication simply by login to Liferay, and see if accesing to other node (using a load balancer, for example, to mantain the URL so cookies persist after accessing both nodes) works. After that you can try the shared attributes property.
thumbnail
Krzysztof Gołębiowski, modificado hace 10 años.

RE: session.shared.attributes not working in cluster

Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
I've clustered both 6.0 and 6.1 and everything worked fine. Clustering sessions is actually not Liferay responsibility but Application Server (Tomcat in this case). To test it you can put JSP file to webapps/ROOT (or even deploy new WAR file) printing out session ID - out.println(" ID " + session.getId());. If cluster is working properly, page rendered on both nodes should display the same ID.

We tried Terracota for clustering ehcache and there were lot of problems. Currently I don't know any working production installation.
thumbnail
Mikhail Zheludev, modificado hace 10 años.

RE: session.shared.attributes not working in cluster

Junior Member Mensajes: 43 Fecha de incorporación: 8/01/13 Mensajes recientes
Krzysztof,
Yes, it is true, can get the same session ID in LR-worker2, and even authenticated user from session, but cannot get session attribute in LR-worker2, which was put from LR-worker1. Did you try this case?