Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Fateh Alchhabi
Clear content cached across the cluster
March 8, 2012 7:25 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

hi all
i have two clustered liferay 6.5 servers ,two database server Master/Master replication relationship & have solr Server

when i add or modify any journal articles i can't see the changes on the next server till i go to control panel >> Server administration >> and execute the "Clear content cached across the cluster."

and this my portal-ext.properties is



jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://xxx.xxx.xxx.122:3306/tabuk_db?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=user_a
jdbc.default.password=1234a5678

jdbc.one.driverClassName=com.mysql.jdbc.Driver
jdbc.one.url=jdbc:mysql://xxx.xxx.xxx.119:3306/tabuk_db?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.one.username=user_a
jdbc.one.password=1234a5678

jdbc.two.driverClassName=com.mysql.jdbc.Driver
jdbc.two.url=jdbc:mysql://xxx.xxx.xxx.122:3306/tabuk_db?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.two.username=user_a
jdbc.two.password=1234a5678



shard.available.names=default,one,two
shard.selector=com.liferay.portal.dao.shard.RoundRobinShardSelector

spring.configs=\
META-INF/base-spring.xml,\
\
META-INF/hibernate-spring.xml,\
META-INF/infrastructure-spring.xml,\
META-INF/management-spring.xml,\
\
META-INF/util-spring.xml,\
\
META-INF/jpa-spring.xml,\
\
META-INF/audit-spring.xml,\
META-INF/cluster-spring.xml,\
META-INF/editor-spring.xml,\
META-INF/jcr-spring.xml,\
META-INF/ldap-spring.xml,\
META-INF/messaging-core-spring.xml,\
META-INF/messaging-misc-spring.xml,\
META-INF/poller-spring.xml,\
META-INF/rules-spring.xml,\
META-INF/scheduler-spring.xml,\
META-INF/scripting-spring.xml,\
META-INF/search-spring.xml,\
META-INF/workflow-spring.xml,\
\
META-INF/counter-spring.xml,\
META-INF/document-library-spring.xml,\
META-INF/mail-spring.xml,\
META-INF/portal-spring.xml,\
META-INF/portlet-container-spring.xml,\
\
#META-INF/dynamic-data-source-spring.xml,\
META-INF/shard-data-source-spring.xml,\
#META-INF/memcached-spring.xml,\
#META-INF/monitoring-spring.xml,\
\
META-INF/ext-spring.xml
#,\
#META-INF/ext-jotm.xml


# SOLR config
solr.server.url=http://xxx.xxx.xxx.121:8983/solr


jcr.initialize.on.startup=true
jcr.workspace.name=liferay
jcr.node.documentlibrary=documentlibrary
jcr.jackrabbit.repository.root=${liferay.home}/data/jackrabbit
jcr.jackrabbit.config.file.path=${jcr.jackrabbit.repository.root}/repository.xml
jcr.jackrabbit.repository.home=${jcr.jackrabbit.repository.root}/home
jcr.jackrabbit.credentials.username=none
jcr.jackrabbit.credentials.password=none

dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
image.hook.impl=com.liferay.portal.image.DatabaseHook
dl.hook.s3.access.key=
dl.hook.s3.secret.key=
dl.hook.s3.bucket.name=
dl.file.max.size=0
dl.file.extensions=*
dl.comparable.file.extensions=.css,.js,.htm,.html,.txt,.xml
dl.layouts.sync.enabled=false
dl.layouts.sync.private.folder=Pages - Private
dl.layouts.sync.public.folder=Pages - Public
dl.file.entry.comments.enabled=true
dl.file.rank.enabled=true


## Quartz
org.quartz.jobStore.isClustered=true


cluster.executor.debug.enabled=true

hibernate.cache.provider_class=com.liferay.portal.dao.orm.hibernate.EhCacheProvider
net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml

transaction.isolation.portal=-1




any idea ?????emoticon
Amos Fong
RE: Clear content cached across the cluster
March 12, 2012 1:27 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1844

Join Date: October 7, 2008

Recent Posts

Looks like you're using default multicast groups/ports then?
1    multicast.group.address*...
2    multicast.group.port*...
3
4    multicast.group.address["multi-vm"]=239.255.0.5
5    multicast.group.port["multi-vm"]=23305


Can you make sure your two nodes can communicate through these addresses/ports

I believe you also want to turn on cluster link too. I'm not sure all the things affected by it, but I know managing scheduled jobs is part of it.

1    #
2    # Set this to true to enable the cluster link. This is required if you want
3    # to cluster indexing and other features that depend the cluster link.
4    #
5    cluster.link.enabled=false
Fateh Alchhabi
RE: Clear content cached across the cluster
March 19, 2012 12:39 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

thanks for replay but as i know the
cluster.link
it works only for EE Edition right ?
Hitoshi Ozawa
RE: Clear content cached across the cluster
March 19, 2012 1:20 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

it works only for EE Edition right ?


It works for CE too.

You've mentioned that you've setup a Liferay in cluster? How did you set it up? Did you cluster your application server (e.g. JBoss cluster)? If you did, you may run into some trouble.

Liferay tries to get data from the cache before going to the database. So, you'll have to share the cache by activating clusterlink.

If you activate Clusterlink, be sure to check that the data is not being written to the 2 Masters separately because it may result in duplicate entries.
Fateh Alchhabi
RE: Clear content cached across the cluster
March 23, 2012 11:57 PM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

i clustered liferay-6.5 with Hardware F5 Load Balancer
Fateh Alchhabi
RE: Clear content cached across the cluster
March 24, 2012 12:06 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

i solve the problem by adding the folloing to my portal-ext and adding with myehcache folder to the location /liferay-6.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes i include the file in the attachment

but i still don't know what the wrong with the default value ??




##
## Hibernate
##
hibernate.configs=\
META-INF/mail-hbm.xml,\
META-INF/portal-hbm.xml,\
META-INF/ext-hbm.xml

hibernate.cache.provider_class=com.liferay.portal.dao.orm.hibernate.EhCacheProvider

net.sf.ehcache.configurationResourceName=/myehcache/ehcache/hibernate.xml

net.sf.ehcache.configurationResourceName.peerProviderProperties=peerDiscovery=automatic,multicastGroupAddress=${multicast.group.address["hibernate"]},multicastGroupPort=${multicast.group.port["hibernate"]},timeToLive=1

hibernate.cache.use_query_cache=true
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_minimal_puts=true
hibernate.cache.use_structured_entries=false

hibernate.jdbc.batch_size=20

hibernate.jdbc.use_scrollable_resultset=true
hibernate.bytecode.use_reflection_optimizer=true
hibernate.show_sql=false

hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory

hibernate.generate_statistics=false




##
## Ehcache
##
ehcache.single.vm.config.location=/myehcache/ehcache/liferay-single-vm.xml
ehcache.multi.vm.config.location=/myehcache/ehcache/liferay-multi-vm.xml
ehcache.multi.vm.config.location=/myehcache/ehcache/liferay-multi-vm-clustered.xml

ehcache.multi.vm.config.location.peerProviderProperties=peerDiscovery=automatic,multicastGroupAddress=${multicast.group.address["multi-vm"]},multicastGroupPort=${multicast.group.port["multi-vm"]},timeToLive=1

ehcache.bootstrap.cache.loader.factory=net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory

ehcache.cache.event.listener.factory=net.sf.ehcache.distribution.RMICacheReplicatorFactory

ehcache.cache.manager.peer.provider.factory=net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory

ehcache.portal.cache.manager.jmx.enabled=true

ehcache.blocking.cache.allowed=true

ehcache.statistics.enabled=false



Attachments: myehcache.zip (5.5k)
Hitoshi Ozawa
RE: Clear content cached across the cluster
March 24, 2012 1:45 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

but i still don't know what the wrong with the default value ??


Liferay's default is just for a standalone configuration because most small users aren't clustering.
Mathieu Hicauber
RE: Clear content cached across the cluster
May 15, 2012 12:41 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Hi,

Exactly the same problem here : journal article is not updated on my LR node #2 until I hit the "clear content cached accross the cluster" button. So 'I'm really happy you found a solution emoticon

I'm using jgroups to handle nodes communication - is this kind of network communication compliant with your settings ?