掲示板

Clear content cached across the cluster

thumbnail
12年前 に Fateh Alchhabi によって更新されました。

Clear content cached across the cluster

Junior Member 投稿: 58 参加年月日: 10/12/01 最新の投稿
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
thumbnail
12年前 に Amos Fong によって更新されました。

RE: Clear content cached across the cluster

Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
Looks like you're using default multicast groups/ports then?
    multicast.group.address*...
    multicast.group.port*...

    multicast.group.address["multi-vm"]=239.255.0.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.

    #
    # Set this to true to enable the cluster link. This is required if you want
    # to cluster indexing and other features that depend the cluster link.
    #
    cluster.link.enabled=false
thumbnail
12年前 に Fateh Alchhabi によって更新されました。

RE: Clear content cached across the cluster

Junior Member 投稿: 58 参加年月日: 10/12/01 最新の投稿
thanks for replay but as i know the
cluster.link
it works only for EE Edition right ?
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: Clear content cached across the cluster

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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.
thumbnail
12年前 に Fateh Alchhabi によって更新されました。

RE: Clear content cached across the cluster

Junior Member 投稿: 58 参加年月日: 10/12/01 最新の投稿
i clustered liferay-6.5 with Hardware F5 Load Balancer
thumbnail
12年前 に Fateh Alchhabi によって更新されました。

RE: Clear content cached across the cluster (回答)

Junior Member 投稿: 58 参加年月日: 10/12/01 最新の投稿
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



添付ファイル:

thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: Clear content cached across the cluster

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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.
thumbnail
11年前 に Mathieu Hicauber によって更新されました。

RE: Clear content cached across the cluster

Junior Member 投稿: 79 参加年月日: 10/12/22 最新の投稿
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 ?
5年前 に Vishnu S Kumar によって更新されました。

RE: Clear content cached across the cluster

Regular Member 投稿: 131 参加年月日: 17/07/28 最新の投稿
Mathieu HicauberHi,

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 ?
I got this same issue in the non clustered environment as well. Our related assets in a web content on a page won't get updated unless we do a clear cache or turn off caching in the templates.