AnsweredAssumed Answered

Clustering with Alfresco Community 5.0.d

Question asked by prachi379 on Dec 7, 2015
Latest reply on Feb 25, 2016 by sergiovallarta
Since clustering is not supported for alfresco community, we have tried to implement our own clustering solution. We have 2 alfresco servers, both have community 5.0.a installed and a load balancer distributes the traffic between these two servers. Both the servers speak to the same database and share a single contentshare/contentshare.deleted repository and this system has been in use for over a year. Now I am trying to replicate the cache on the cluster and I have read that alfresco uses ehcache. So I have created /opt/alfresco-5.0.d/tomcat/shared/classes/alfresco/extension/ehcache-custom.xml and followed steps from this page - http://docs.alfresco.com/4.0/tasks/jgroups-repo.html

My alfresco-global.properties on 'server1' has the below lines -
# Ehcache Settings
alfresco.cluster.name=cluster1
index.recovery.mode = AUTO
alfresco.ehcache.rmi.hostname=server2@domain
alfresco.rmi.services.external.host=server2@domain
alfresco.ehcache.rmi.port=40001
alfresco.ehcache.rmi.remoteObjectPort=45001

and on 'server2' -
# Ehcache Settings
alfresco.cluster.name=cluster1
index.recovery.mode = AUTO
alfresco.ehcache.rmi.hostname=server1@domain
alfresco.rmi.services.external.host=server1@domain
alfresco.ehcache.rmi.port=40001
alfresco.ehcache.rmi.remoteObjectPort=45001

I have also changed the cacheManagerPeerProviderFactory definition to below -

   <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="peerDiscovery=automatic,
                        multicastGroupAddress=230.0.0.1,
                        multicastGroupPort=4447"/>


but this is not working. Is it possible to get the ehcache replication working out of the box and if yes, how can I achieve this? If this cannot work without JGroups, is it possible to do it some other way?

Outcomes