Forums de discussion

Cluster - Lucene Replication

thumbnail
Drew Blessing, modifié il y a 12 années.

Cluster - Lucene Replication

Junior Member Publications: 78 Date d'inscription: 27/01/11 Publications récentes
I have been researching and attempting to set up a Liferay cluster. Here's a quick background of my current setup:
2 Liferay Nodes on Tomcat
Cluster Link and Tomcat Clustering set up and enabled (No Session Replication because I read a wiki saying Liferay does not recommend it)
Load Balancer with Sticky Sessions
Separate MySQL DB Server
Shared Liferay Data Directory on Storage Cluster (Not including Deploy, Jackrabbit and Lucene Directories)

We shouldn't need to deploy anything like SOLR right now, but we do need to figure out how to replicate indices across several cluster nodes. I have turned on cluster link and I see the join messages in the logs (with debugging turned on). However, I am not confident that the indices are replicating. How may I check this? I also enabled lucene.replicate.write=true hoping that would help but I didn't see much change in the logs.

I noticed a possible config property, ehcache.cluster.link.replication.enabled=false, that I wonder if needs to be enabled, also. However, the notes in the properties file say this requires the Ehcache Cluster web application. Do I need to set this up?

Based on my current setup as described above, are there any other recommendations you can make? I have not been able to find any special considerations for the shared DB and shared data directory
thumbnail
Paul Hussein, modifié il y a 12 années.

RE: Cluster - Lucene Replication

Junior Member Publications: 63 Date d'inscription: 31/05/06 Publications récentes
to check for correct replication
Use http://code.google.com/p/luke/ to open the indexes. Query the user table using SQL and see if the numbers and users all match
thumbnail
Juan Gonzalez P, modifié il y a 12 années.

RE: Cluster - Lucene Replication

Liferay Legend Publications: 3089 Date d'inscription: 28/10/08 Publications récentes
Drew Blessing:
I have been researching and attempting to set up a Liferay cluster. Here's a quick background of my current setup:
2 Liferay Nodes on Tomcat
Cluster Link and Tomcat Clustering set up and enabled (No Session Replication because I read a wiki saying Liferay does not recommend it)
Load Balancer with Sticky Sessions
Separate MySQL DB Server
Shared Liferay Data Directory on Storage Cluster (Not including Deploy, Jackrabbit and Lucene Directories)

We shouldn't need to deploy anything like SOLR right now, but we do need to figure out how to replicate indices across several cluster nodes. I have turned on cluster link and I see the join messages in the logs (with debugging turned on). However, I am not confident that the indices are replicating. How may I check this? I also enabled lucene.replicate.write=true hoping that would help but I didn't see much change in the logs.

I noticed a possible config property, ehcache.cluster.link.replication.enabled=false, that I wonder if needs to be enabled, also. However, the notes in the properties file say this requires the Ehcache Cluster web application. Do I need to set this up?

Based on my current setup as described above, are there any other recommendations you can make? I have not been able to find any special considerations for the shared DB and shared data directory


What Liferay version are you using?

What I've tested for Lucene replication is:

     
    lucene.replicate.write=true 

    cluster.link.enabled=true //AFAIK THIS ENABLES MULTICAST REPLICATION


And is working ok.

Please read the comments of that properties in portal.properties to clarify.

Another important properties in clustering may be these:

net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml

ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml

dl.hook.impl=com.liferay.documentlibrary.util.AdvancedFileSystemHook  //RECOMMENDED IF USING A SAN FOR STORING DOCUMENTS

 //MODIFY MULTICAST ADDRESS/PORT TO FIT YOUR ENVIRONMENT
#
    # See the property "cluster.link.channel.properties.control".
    #
    multicast.group.address["cluster-link-control"]=239.255.0.1
    multicast.group.port["cluster-link-control"]=23301

    #
    # See the properties "cluster.link.channel.properties.transport.0" and
    # "cluster.link.channel.system.properties".
    #
    multicast.group.address["cluster-link-udp"]=239.255.0.2
    multicast.group.port["cluster-link-udp"]=23302

    #
    # See the property "cluster.link.channel.system.properties".
    #
    multicast.group.address["cluster-link-mping"]=239.255.0.3
    multicast.group.port["cluster-link-mping"]=23303

    #
    # See the properties "net.sf.ehcache.configurationResourceName" and
    # "net.sf.ehcache.configurationResourceName.peerProviderProperties".
    #
    multicast.group.address["hibernate"]=239.255.0.4
    multicast.group.port["hibernate"]=23304

    #
    # See the properties "ehcache.multi.vm.config.location" and
    # "ehcache.multi.vm.config.location.peerProviderProperties".
    #
    multicast.group.address["multi-vm"]=239.255.0.5
    multicast.group.port["multi-vm"]=23305

thumbnail
Hitoshi Ozawa, modifié il y a 12 années.

RE: Cluster - Lucene Replication

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
We
shouldn't need to deploy anything like SOLR right now, but we do need to figure out how to replicate indices across several cluster nodes.


If it's just a matter of user and organization indicies, you can just tell liferay to use database indicies instead of Lucene indicies.
Marcelo Bezerra, modifié il y a 8 années.

RE: Cluster - Lucene Replication

New Member Publications: 5 Date d'inscription: 09/04/15 Publications récentes
how do we tell liferay to use database indicies instead of Lucene indicies?
Marcelo Bezerra, modifié il y a 8 années.

RE: Cluster - Lucene Replication

New Member Publications: 5 Date d'inscription: 09/04/15 Publications récentes
I found this other thread ( https://www.liferay.com/pt/community/forums/-/message_boards/message/14389830 ) indicating that in Liferay 6.1 maybe you can´t tell liferay to use database indicies instead of Lucene indicies. At least, not with the "lucene.store.type=jdbc" property.

Somebody can confirm that or know other way to configure this in a way that works for Liferay 6.1?