Message Boards

Image does not replicate on Community edition in cluster environment

Jigar N Gajjar, modified 7 Years ago.

Image does not replicate on Community edition in cluster environment

Junior Member Posts: 71 Join Date: 12/25/09 Recent Posts
Hi Team,

I have configured cluster environment using community edition.

dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore

I am using DBStore to store document and images.

When I upload image to one node, it is not available to another node unless I clear cluster cache from control panel.
and same issue for add/delete page.

But strange thing is, document library works for everything other then images.

I added below entry in hibernate-cluster.xml
<cache
eternal="false"
maxElementsInMemory="10000"
name="com.liferay.portlet.documentlibrary.model.impl.DLFileEntryImpl"
overflowToDisk="false"
timeToIdleSeconds="600"
>
<cacheEventListenerFactory
class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory"
properties="replicatePuts=true,replicateUpdatesViaCopy=true"
propertySeparator=","

/>
<bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>

</cache>


and below entry in ilferay-multi-vm-clustered.xml

<cache
eternal="false"
maxElementsInMemory="100000"
name="com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portlet.documentlibrary.model.impl.DLFileEntryImpl"
overflowToDisk="false"
timeToIdleSeconds="600"
>
<cacheEventListenerFactory
class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory"
properties="replicatePuts=true,replicateUpdatesViaCopy=true"
propertySeparator=","
/>
</cache>

here is my portal-ext.properties

net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml

cluster.link.enabled=true
lucene.replicate.write=true
ehcache.cluster.link.replication.enabled=true
web.server.display.node=true
org.quartz.jobStore.isClustered=true
hibernate.cache.provider_class=com.liferay.portal.dao.orm.hibernate.EhCacheProvider
portal.instance.http.port=9090
portal.instance.protocol=http
cluster.executor.debug.enabled=true




velocity.engine.resource.manager.cache.enabled=false
layout.template.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
theme.css.fast.load=false
theme.images.fast.load=false
ehcache.statistics.enabled=true

not sure if I am missing anything,

Appreciate any help here.

Thanks,
Jigar Gajjar
thumbnail
David H Nebinger, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Liferay Legend Posts: 14914 Join Date: 9/2/06 Recent Posts
That means your cluster is not properly functioning.

If it were, the messaging between the nodes would notify the others of the new image and they would, in turn, dump their caches on their own.
Jigar N Gajjar, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Junior Member Posts: 71 Join Date: 12/25/09 Recent Posts
What should I check to make sure cluster is configured properly.

I can see that newly created user are available to another node.
I can see that newly uploaded document like pdf/doc are available to another node instantly.

I am facing issue with page and image only.

Please give me some pointer to debug this issue.

Thanks,
Jigar Gajjar
thumbnail
Olaf Kock, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Liferay Legend Posts: 6396 Join Date: 9/23/08 Recent Posts
Jigar N Gajjar:
Please give me some pointer to debug this issue.


  • As David said: Do both nodes communicate to each other? You'll find such information in the logs
  • What does "not available" mean: 404-not found? Access Denied? Does it become available eventually?
  • Is there a difference in uploading the documents? E.g. upload through interface #1 works, upload through interface #2 doesn't? (I'd not expect things like this though)
  • You said, you're using "community edition", but omit which version - please give the exact version - and reasons why it's not the latest available GA in case it isn't.
Jigar N Gajjar, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Junior Member Posts: 71 Join Date: 12/25/09 Recent Posts
Hi Olaf,

thanks for your reply.

Please find my answer below:
As David said: Do both nodes communicate to each other? You'll find such information in the logs
Ans :Yes, I see something like below:
INFO: Replication member added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{10, 0, 40, 69}:4000,{10, 0, 40, 69},4000, alive=79221, securePort=-1, UDP Port=-1, id={43 -122 -94 75 66 69 79 -29 -112 124 -10 -70 -36 -109 27 -16 }, payload={}, command={}, domain={}, ]

18:37:23,904 INFO [Incoming-1,liferay-channel-control,ICC10852-27474][BaseReceiver:83] Accepted view [ICC10852-27474|1] [ICC10852-27474, ICC10852-16004]
18:37:24,928 INFO [Incoming-1,liferay-channel-transport-0,ICC10852-27824][BaseReceiver:83] Accepted view [ICC10852-27824|1] [ICC10852-27824, ICC10852-59673]

I see this kind of messages on both nodes and it notifies each other when one node goes down.

What does "not available" mean: 404-not found? Access Denied? Does it become available eventually?
Ans :Well not available means updated image will not be shown on another node until l refresh cluster cache from server administration.

Is there a difference in uploading the documents? E.g. upload through interface #1 works, upload through interface #2 doesn't? (I'd not expect things like this though)
Ans:no, behavior is same from both of nodes.
You said, you're using "community edition", but omit which version - please give the exact version - and reasons why it's not the latest available GA in case it isn't.
Ans :Liferay Portal Community Edition 6.2 CE GA5 (Newton / Build 6204 / November 25, 2015)

Please also note that as per liferay documentation about cluster from below link:
https://dev.liferay.com/discover/deployment/-/knowledge_base/6-2/liferay-clustering

I have also modified cluster configuration for Document library in "hibernate-clustered.xml" and in "liferay-multi-vm-clustered.xml"

I have attached these two files here.

Really appreciate your interest,
please let me know if you need more information.

Thanks,
Jigar Gajjar
Jigar N Gajjar, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Junior Member Posts: 71 Join Date: 12/25/09 Recent Posts
Did yo get a chance to look into this?
Jigar N Gajjar, modified 7 Years ago.

RE: Image does not replicate on Community edition in cluster environment

Junior Member Posts: 71 Join Date: 12/25/09 Recent Posts
Can anyone answer this please?