Kombinált nézet Egyszerű nézet Fa-nézet
Szálak [ Előző | Következő ]
toggle
Fateh Alchhabi
Clear content cached across the cluster
2012. március 8. 7:25
Válasz

Fateh Alchhabi

Rangsorolás: Junior Member

Hozzászólások: 58

Csatlakozás dátuma: 2010. december 1.

Legújabb hozzászólások

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
2012. március 12. 1:27
Válasz

Amos Fong

LIFERAY STAFF

Rangsorolás: Liferay Legend

Hozzászólások: 1817

Csatlakozás dátuma: 2008. október 7.

Legújabb hozzászólások

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
2012. március 19. 0:39
Válasz

Fateh Alchhabi

Rangsorolás: Junior Member

Hozzászólások: 58

Csatlakozás dátuma: 2010. december 1.

Legújabb hozzászólások

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
2012. március 19. 1:20
Válasz

Hitoshi Ozawa

Rangsorolás: Liferay Legend

Hozzászólások: 8000

Csatlakozás dátuma: 2010. március 23.

Legújabb hozzászólások

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
2012. március 23. 23:57
Válasz

Fateh Alchhabi

Rangsorolás: Junior Member

Hozzászólások: 58

Csatlakozás dátuma: 2010. december 1.

Legújabb hozzászólások

i clustered liferay-6.5 with Hardware F5 Load Balancer
Fateh Alchhabi
RE: Clear content cached across the cluster
2012. március 24. 0:06
Válasz

Fateh Alchhabi

Rangsorolás: Junior Member

Hozzászólások: 58

Csatlakozás dátuma: 2010. december 1.

Legújabb hozzászólások

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



Mellékletek: myehcache.zip (5,5k)
Hitoshi Ozawa
RE: Clear content cached across the cluster
2012. március 24. 1:45
Válasz

Hitoshi Ozawa

Rangsorolás: Liferay Legend

Hozzászólások: 8000

Csatlakozás dátuma: 2010. március 23.

Legújabb hozzászólások

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
2012. május 15. 0:41
Válasz

Mathieu Hicauber

Rangsorolás: Junior Member

Hozzászólások: 79

Csatlakozás dátuma: 2010. december 22.

Legújabb hozzászólások

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 ?