構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
How do I fix Session/Cache/Search replication for LR on Glassfish Cluster? Dave F 2013/04/02 8:37
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/04/02 13:16
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/04/02 14:32
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/04/03 7:35
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/04/03 11:29
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/04/03 14:15
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/04/26 14:11
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/04/26 15:17
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/04/29 6:56
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/04/29 10:33
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/05/02 12:56
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/05/02 13:56
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/05/02 14:06
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Juan Gonzalez 2013/05/02 14:16
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust Dave F 2013/05/02 14:27
Dave F
How do I fix Session/Cache/Search replication for LR on Glassfish Cluster?
2013/04/02 8:37
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

I have Liferay EE 6.1.20 deployed to Oracle Glassfish Server 3.1.2.2. There are two instances set up, and Liferay is deployed to both. Liferay seems to work fine on them individually.

When I add <distributable /> to the web.xml for each Liferay instance, I get some strange behaviour:

I am intermittently but frequently prompted to log in again. I have enabled cache and search replication, but neither of these appear to be working as well.

In the server log, I get several lines of the following message (each referring to a different skipped cacheable item):
115:15:55,587 DEBUG [http-thread-pool-28080(4)][ConfigurationHelper:38] CacheDecoratorFactory not configured for defaultCache. Skipping for 'com.liferay.portal.kernel.dao.orm.FinderCache.com.liferay.portlet.mobiledevicerules.model.impl.MDRRuleGroupInstanceImpl.List2'.


I appreciate any advice. Thanks!
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/02 13:16
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Did you enable replication in Glassfish console?
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/02 14:32
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

I've done the following to enable cache replication:

Enabled 'Availability' on the deployed Liferay application in the Glassfish console

Added the following to my portal-ext.properties file:

cluster.link.enabled=true
ehcache.cluster.link.replication.enabled=true

Added the following to my web.xml file (inside the <web-app> tags at the very top):

<distributable />

Any thoughts?
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/03 7:35
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Well, this seems to be a session replication, hence Glassfish problem.

Can you try deploying clusterjsp EAR file that should be in glassfish directory?


http://glassfish.java.net/javaee5/build/GlassFish_LB_Cluster.html#deploy

After that, check that session and attributes are replicating to all nodes.
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/03 11:29
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

Thanks Juan,

I deployed the clusterjsp application, and it looks like session replication is not working with it as well.

Thanks for getting me pointed in the right direction. I'll focus on troubleshooting Glassfish session replication.
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/03 14:15
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Glad I helped emoticon
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/26 14:11
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

Hi Juan, I hope you're still watching this thread.

I've resolved my issue with Glassfish session replication -- Session values are now replicated to both nodes, and the clusterjsp application works as expected.

I am still not able to get session replication to work in Glassfish, however. When I access an individual instance, it works fine, but when I access them through the load balancer (Apache HTTPD/mod_proxy) I cannot log in. I am just returned to the login page.

The only thing I have noticed which appears strange in the logs is the following entry:
1WARN org.quartz.simpl.PropertySettingJobFactory - No setter on Job class com.liferay.portal.scheduler.job.MessageSenderJob for property 'JOB_STATE'


Several of these messages appear, but only in the log for instance 1.
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/26 15:17
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Hi Dave,

Ok so now you only have to add <distributable/> to web.xml file in liferay WAR.

After that, you should configure cluster link to enable indexes and hibernate cache in cluster.
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/29 6:56
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

Thanks Juan.

I do have those entries in my web.xml and my portal-ext.properties file respectively. Liferay still doesn't maintain my session while logged in, however. I am automatically logged out when I try to go to a different page, or go into the control panel.

Here are the contents of my web.xml and portal-ext.properties (in case there is something else I've missed):

1
2<?xml version="1.0"?>
3
4<web-app id="Liferay_Portal" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
5    <distributable />
6    <context-param>
7
8...


I had to truncate the file above to get this message to post, but I can add the rest or specific sections in another message if it will help. Really, it should be all the default web.xml content that comes with the standalone Liferay download.

 1# This document will be a catch-all reference for properties entries used throughout setup of the
 2# portal.
 3#
 4# It is not intended to be used in it's entirety, but to provide code 'snippets' to be copied and
 5# pasted into the portal-ext.properties file as needed
 6
 7# Enable session replication for search index and cache replication
 8cluster.link.enabled=true
 9
10# Enable search index replication in particular (requires cluster.link.enabled=true above)
11lucene.replicate.write=true
12
13# Enable cache replication for ehcache in particular (requires cluster.link.enabled=true above)
14ehcache.cluster.link.replication.enabled=true
15
16# Cluster link attempts to ping an address (any address) to verify that the cluster is available.
17# By default it uses www.google.com:80 but the setting below can be used to override the address
18# used.
19cluster.link.autodetect.address=x.x.x.x:22
20
21# Makes the jdbc/LiferayPool database pool available in Liferay.  The pool must be preconfigured in
22# the application server (Glassfish)
23jdbc.default.jndi.name=jdbc/LiferayPool
24
25# Updates the context root used by the portal when doing redirection after login, etc.  Should match
26# the context root set for the portal in the application server (Glassfish)
27portal.ctx=/portal


FYI: The redacted clusterlink autodetect address above is a host on the internal network which is reachable by SSH (hence, using port 22). This needed to be changed because the server does not have direct access to the internet, so it can't reach www.google.com:80.

I appreciate the help!
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/04/29 10:33
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Dave F:

Liferay still doesn't maintain my session while logged in, however. I am automatically logged out when I try to go to a different page, or go into the control panel.


You said you're logged out when going to another page. But, is this still happening while in the same host you logged in? What are the URL used (IP, domain)?

It could be a good thing if you can get the HTTP headers sequence using firebug to see what is happening between server and your browser.
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/05/02 12:56
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

It looked like each request would be assigned a new session ID.

We are currently putting the proof-of-concept with Glassfish on hold for now, and will be trying out Tomcat to see if it might be a better alternative for us.

Thank-you for the help, Juan
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/05/02 13:56
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

Did you check if JSESSIONID cookie from your browser to server is the same in the second request?

Are you using some kind of load balancer/proxy (apache, etc) ?
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/05/02 14:06
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

Using Apache with mod_proxy for load balancing.

The JSESSIONID cookie was present, but it had a new value with each request.
Juan Gonzalez
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/05/02 14:16
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1752

参加年月日: 2008/10/28

最近の投稿

So seems that can be the issue.

Are you sure you configured properly Apache to work with JSESSIONID cookies?

You can try configuring some portal-ext.properties. like:

session.enable.url.with.session.id (if you see JSESSIONID is in your URL)

web.server.* (there are some of them)

redirect.url.*

I don't have much experience using Apache. I used haproxy without any problem.
Dave F
RE: How do I fix Session/Cache/Search replication for LR on Glassfish Clust
2013/05/02 14:27
答え

Dave F

ランク: Junior Member

投稿: 28

参加年月日: 2013/01/29

最近の投稿

I'll give it a try and see what happens.

Thanks again!