掲示板

Tomcat clustering to share (sync) Liferay EHCache

8年前 に Thuan VU によって更新されました。

Tomcat clustering to share (sync) Liferay EHCache

New Member 投稿: 2 参加年月日: 16/03/30 最新の投稿
Hi all,

I have some troubles with Liferay EH Cache clustering. As below:
1. Using Load balancing: I use three Servers (A, B, C), in which: A and B are used to install Tomcat Server and Liferay app on each one, C is used as Load balancing. I use httpd (apache) with mod_ajp proxy. I only use unique Database for 2 Liferay apps. It's ok, I installed successfully and load balancing well.
2. Clustering using Tomcat clustering with Replication session: I write a small apps to test replication session, it's ok. Next, I did follow http://www.appuntivari.net/informatica/programmazione/liferay/performance-best-practices/load-balancing-and-clustering-best-practices
Everything's good, no error happened but Liferay seems not to share (sync) cache between 2 servers (A, B ), portal-ext.properties as below:
#USING JGroup
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml
ehcache.multi.vm.config.location.peerProviderProperties=connect=UDP(mcast_addr=multicast.group.address["hibernate"];
mcast_port=multicast.group.port["hibernate"]; ) : PING:MERGE2:FD_SOCK : VERIFY_SUSPECT : pbcast.NAKACK:UNICAST:pbcast.STABLE:FRAG:pbcast.GMS
ehcache.bootstrap.cache.loader.factory=com.liferay.portal.cache.ehcache.JGroupsBootstrapCacheLoaderFactory
ehcache.cache.event.listener.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory
net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
net.sf.ehcache.configurationResourceName.peerProviderProperties=peerDiscovery=connect=UDP(mcast_addr=multicast.group.address["multi-vm"];mcast_port=multicast.group.port["multi-vm"]; ): PING:MERGE2:FD_SOCK: VERIFY_SUSPECT:pbcast.NAKACK:UNICAST: pbcast.STABLE:FRAG: pbcast.GMS
multicast.group.address["hibernate"] = 233.0.0.4
multicast.group.port["hibernate"] = 23304
multicast.group.address["multi-vm"] = 233.0.0.5
multicast.group.port["multi-vm"] = 23305
ehcache.cache.manager.peer.provider.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory
value.object.entity.cache.enabled.com.liferay.portal.model.Layout=true
value.object.entity.cache.enabled.com.liferay.portal.model.User=true
value.object.entity.cache.enabled.com.liferay.portlet.social.model.SocialEquityAssetEntry=false
value.object.entity.cache.enabled.com.liferay.portlet.social.model.SocialEquityLog=false
value.object.entity.cache.enabled.com.liferay.portlet.social.model.SocialEquityUser=false

Anybody had config or used Liferay clustering to share ehcache, please share me your every experiences or any solutions to deal with Liferay EHCache sharing.
Thanks in advance!
Thuan
thumbnail
8年前 に Andrew Jardine によって更新されました。

RE: Tomcat clustering to share (sync) Liferay EHCache

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Thuan,

I've used clustering with Liferay (both multicast and unicast) without issue. Most of the time I am able to get away with just using the default settings for most of what you are specifying below though. Can you try changing your portal-ext.properties to just the following --


cluster.link.enabled=true
cluster.executor.debug.enabled=true 
lucene.replicate.write=true


-- take out all that other stuff for now just to validate that the basic default settings work as well. If that does work, then chances are it is something in your custom settings.

I'm not sure how you are testing but the easiest way is the following.
1. Go to a page on Node 1
2. Go to the same page on Node 2
3. Add a new portlet to the page on Node 1
4. Refresh Node 2 and validate that the portlet is there.
5. Login as the admin on Node 1 and go to the Control Panel > Users and Organizations and add a new user.
6. Login as the admin on Node 2 and go to the Control Panel > User and Organizations and SEARCH for the user you just added. This will validate that lucene is synchronizing as well.

Can you try this out and report back to us? If it is still not working, maybe include a clean startup log?
thumbnail
8年前 に Olaf Kock によって更新されました。

RE: Tomcat clustering to share (sync) Liferay EHCache

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Do what Andrew says. And check the documentation. I'm assuming you're using Liferay 6.2