Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Gunta Dalecka
session.shared.attributes not working in cluster
11 de noviembre de 2013 2:25
Respuesta

Gunta Dalecka

Ranking: New Member

Mensajes: 4

Fecha de incorporación: 7 de noviembre de 2013

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.
Juan Gonzalez
RE: session.shared.attributes not working in cluster
11 de noviembre de 2013 3:58
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1865

Fecha de incorporación: 28 de octubre de 2008

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
RE: session.shared.attributes not working in cluster
11 de noviembre de 2013 6:25
Respuesta

Gunta Dalecka

Ranking: New Member

Mensajes: 4

Fecha de incorporación: 7 de noviembre de 2013

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.
Juan Gonzalez
RE: session.shared.attributes not working in cluster
11 de noviembre de 2013 6:32
Respuesta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1865

Fecha de incorporación: 28 de octubre de 2008

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.
Krzysztof Gołębiowski
RE: session.shared.attributes not working in cluster
11 de noviembre de 2013 11:15
Respuesta

Krzysztof Gołębiowski

Ranking: Expert

Mensajes: 335

Fecha de incorporación: 25 de junio de 2011

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.
Mikhail Zheludev
RE: session.shared.attributes not working in cluster
17 de enero de 2014 6:43
Respuesta

Mikhail Zheludev

Ranking: Junior Member

Mensajes: 43

Fecha de incorporación: 8 de enero de 2013

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?