Problems Synchronizing NodesProblems Synchronizing Nodeshttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=231421712024-03-29T15:49:37Z2024-03-29T15:49:37ZRE: Problems Synchronizing NodesOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1176858012019-11-07T09:19:14Z2019-11-07T09:19:14Z<div class="quote-title">Sumit Kumari:</div><blockquote><br />No, I'm using 6.2 . I didn't find anything related to 6.2 so I implemented it on 6.2 version. Basically, I want to deploy portlets across liferay nodes . I read about farms deployment , can you please tell how I can do that.<br /></blockquote>Farm deployment is a Tomcat feature (maybe other servers as well)<br />That is an option, though Liferay might add some dependencies when deploying from its "deploy" directory into tomcat's "webapps" directory. <br />You can build your plugins in a way that this deployment is done already and the deployed WAR file can be directly deployed to tomcat. If memory serves right, the Ant target is "direct-deploy" (but validate, I might be wrong)<br />Another option is to make sure that some component in your deployment infrastructure copies all plugins to all nodes' deploy directory. You can do that with a script like the one you link to, or with any other solution. Not: Don't share a single deploy directory, because Liferay will delete a processed file from the directory - and then it typically ends up only on one server (the one that found it first)Olaf Kock2019-11-07T09:19:14ZRE: Problems Synchronizing NodesSumit Kumarihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1176772202019-11-06T06:54:42Z2019-11-06T06:54:42Z<div class="quote-title">Olaf Kock:</div><blockquote><br /><div class="quote-title">Sumit Kumari:</div><blockquote><br />Hi , I'm new to lIferay , Can you please help me to sync data b/w all nodes.My setup includes: 1) 2 liferay nodes 2) one database 3) apache webserver for load balancer with mod_jk.My clustering is working and now I want to deploy on one server so that it is synced with all other nodes.For this, I have followed <a href="https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster">https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster</a>, where ndeploy.sh script is given to deploy from one node to others but i'm not able to do so.<br />I want to know if I'm deploying any portlet on one liferay/deploy folder it get s deployed to ndeploy /deploy folder but does not sync with other node to have same data.<br /></blockquote>You're asking this in 2019 on a thread on Liferay 6.1, linking to documentation for that version. Does this mean that you're actually on 6.1? (If the answer is yes, I hope your upgrade-project is coming along quite well, and you're on the way to an updated version)<br /><br />Anyway: The script and methodology documented in the article will enable you to copy files across your network (and grant one machine shell access along the way), something that you could also do any other way you fancy. Try it manually first, then go to automation.</blockquote>No, I'm using 6.2 . I didn't find anything related to 6.2 so I implemented it on 6.2 version. Basically, I want to deploy portlets across liferay nodes . I read about farms deployment , can you please tell how I can do that.Sumit Kumari2019-11-06T06:54:42ZRE: Problems Synchronizing NodesOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1176647842019-11-05T08:00:33Z2019-11-05T08:00:33Z<div class="quote-title">Sumit Kumari:</div><blockquote><br />Hi , I'm new to lIferay , Can you please help me to sync data b/w all nodes.My setup includes: 1) 2 liferay nodes 2) one database 3) apache webserver for load balancer with mod_jk.My clustering is working and now I want to deploy on one server so that it is synced with all other nodes.For this, I have followed <a href="https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster">https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster</a>, where ndeploy.sh script is given to deploy from one node to others but i'm not able to do so.<br />I want to know if I'm deploying any portlet on one liferay/deploy folder it get s deployed to ndeploy /deploy folder but does not sync with other node to have same data.<br /></blockquote>You're asking this in 2019 on a thread on Liferay 6.1, linking to documentation for that version. Does this mean that you're actually on 6.1? (If the answer is yes, I hope your upgrade-project is coming along quite well, and you're on the way to an updated version)<br /><br />Anyway: The script and methodology documented in the article will enable you to copy files across your network (and grant one machine shell access along the way), something that you could also do any other way you fancy. Try it manually first, then go to automation.Olaf Kock2019-11-05T08:00:33ZRE: Problems Synchronizing NodesSumit Kumarihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1176630562019-11-05T06:05:53Z2019-11-05T06:05:53ZHi , I'm new to lIferay , Can you please help me to sync data b/w all nodes.My setup includes: 1) 2 liferay nodes 2) one database 3) apache webserver for load balancer with mod_jk.My clustering is working and now I want to deploy on one server so that it is synced with all other nodes.For this, I have followed <a href="https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster">https://liferay.dev/blogs/-/blogs/liferay-6-1-simple-cluster</a>, where ndeploy.sh script is given to deploy from one node to others but i'm not able to do so.<br />I want to know if I'm deploying any portlet on one liferay/deploy folder it get s deployed to ndeploy /deploy folder but does not sync with other node to have same data.Sumit Kumari2019-11-05T06:05:53ZRE: Problems Synchronizing NodesJuan Gonzalezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=232218652013-04-01T15:43:27Z2013-04-01T15:43:27ZGlad to hear that.<br /><br />The property<br /><br />ehcache.cluster.link.replication.enabled=true <br /><br />shouldn't be used unless you have EE license, and hence you can install ehcache cluster web plugin.Juan Gonzalez2013-04-01T15:43:27ZRE: Problems Synchronizing NodesRobert Revnichttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=232225122013-04-01T15:34:34Z2013-04-01T15:34:34ZI should have mentioned that I also have multiple stand alone nodes running on the box (dev, qastg) in addition to the clustered nodes (qa prd). Shutting everything down and restarting one by one fixed the OOM issue. The clustered nodes are in sync now <img alt="emoticon" src="@theme_images_path@/emoticons/smile.gif" > <img alt="emoticon" src="@theme_images_path@/emoticons/cool.gif" > . Removing the ehcache.cluster.link.replication.enabled=true property worked. Thanks for the help.Robert Revnic2013-04-01T15:34:34ZRE: Problems Synchronizing NodesJuan Gonzalezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=232212802013-04-01T15:01:31Z2013-04-01T15:01:31ZCan you try shutting down all nodes and then ensure there aren't any Liferay process running? (for example: ps -ef |grep java and kill all process that should be stopped) ?<br /><br />After that, start one node, see logs, and then start second node and see its logs....Juan Gonzalez2013-04-01T15:01:31ZRE: Problems Synchronizing NodesRobert Revnichttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=232200992013-04-01T14:57:38Z2013-04-01T14:57:38ZThanks for the support Juan.<br /><br />When commenting out ehcache.cluster.link.replication.enabled=true, the following errors are thrown when the second node is started:<br /><br />14:33:06,980 INFO [pool-3-thread-1][LiferayCacheManagerPeerProviderFactory:76] portalPropertyKey net.sf.ehcache.configurationResourceName.peerProviderProperties has value peerDiscovery=automatic,multicastGroupAddress=239.255.0.4,multicastGroupPort=23304,timeToLive=1<br />14:33:08,423 ERROR [pool-3-thread-1][ContextLoader:227] Context initialization failed<br />org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.spring.aop.ServiceBeanAutoProxyCreator#0' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'serviceAdvice' while setting bean property 'methodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'asyncAdvice' while setting bean property 'nextMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'asyncAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'threadLocalCacheAdvice' while setting bean property 'nextMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'threadLocalCacheAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'bufferedIncrementAdvice' while setting bean property 'nextMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bufferedIncrementAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'indexableAdvice' while setting bean property 'nextMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexableAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'transactionAdvice' while setting bean property 'nextMethodInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionAdvice' defined in class path resource [META-INF/base-spring.xml]: Cannot resolve reference to bean 'liferayTransactionManager' while setting bean property 'platformTransactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayTransactionManager' defined in class path resource [META-INF/hibernate-spring.xml]: Cannot resolve reference to bean 'liferayHibernateSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayHibernateSessionFactory' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread<br /><br />followed by several out of memory exceptions.<br /><br />The nodes are running on the same physical box. Any insight on how I could proceed? Does this still seem like an issue with the multicast?<br /><br /><br />Thanks again,<br /><br />RobRobert Revnic2013-04-01T14:57:38ZRE: Problems Synchronizing NodesJuan Gonzalezhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=231439982013-03-29T21:57:16Z2013-03-29T21:57:16Z<html><head></head><body>Hi Robert,<br><br>You only have to set this properties:<br><br><br><pre><code>cluster.link.enabled=true
lucene.replicate.write=true</code></pre><br><br><br>and then check if the default multicast IP are accesible in your network from one node to the others:<br><br><br><pre><code>multicast.group.address["cluster-link-control"]=239.255.0.1
multicast.group.port["cluster-link-control"]=23301
#
# See the properties "cluster.link.channel.properties.transport.0" and
# "cluster.link.channel.system.properties".
#
multicast.group.address["cluster-link-udp"]=239.255.0.2
multicast.group.port["cluster-link-udp"]=23302
#
# See the property "cluster.link.channel.system.properties".
#
multicast.group.address["cluster-link-mping"]=239.255.0.3
multicast.group.port["cluster-link-mping"]=23303
#
# See the properties "net.sf.ehcache.configurationResourceName" and
# "net.sf.ehcache.configurationResourceName.peerProviderProperties".
#
multicast.group.address["hibernate"]=239.255.0.4
multicast.group.port["hibernate"]=23304
#
# See the properties "ehcache.multi.vm.config.location" and
# "ehcache.multi.vm.config.location.peerProviderProperties".
#
multicast.group.address["multi-vm"]=239.255.0.5
multicast.group.port["multi-vm"]=23305</code></pre></body></html>Juan Gonzalez2013-03-29T21:57:16ZProblems Synchronizing NodesRobert Revnichttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=231421702013-03-29T20:42:12Z2013-03-29T20:42:12ZHi All!<br /><br />I'm having some problems with my Liferay cluster. The cluster consists of two Tomcat nodes which have Liferay 6.1.1 deployed to them. The problem is that the changes made in Liferay on node1 do not reflect on node2 for a significant amount of time (I believe until the ehcache gets invalidated). If I browse to the control panel and hit clear the content cached across the cluster, the changes appear correctly on both nodes. Is there a configuration change that I have overlooked? My portal-ext.properties file can be found below. <br /><br /><em>lucene.replicate.write=true<br /><br /><br />################################################################################################<br />################################################################################################<br />################################################################################################<br /><br /><br /><br />##<br />## Hibernate<br />##<br /><br /> #<br /> # Input a list of comma delimited Hibernate configurations.<br /> #<br /> hibernate.configs=\<br /> META-INF/mail-hbm.xml,\<br /> META-INF/portal-hbm.xml,\<br /> META-INF/ext-hbm.xml<br /><br /> #<br /> # Liferay will automatically detect the Hibernate dialect in<br /> # com.liferay.portal.spring.PortalHibernateConfiguration. Set this property<br /> # to manually override the automatically detected dialect.<br /> #<br /> #hibernate.dialect=<br /><br /> #<br /> # Set the Hibernate connection release mode. You should not modify this<br /> # unless you know what you're doing. The default setting works best for<br /> # Spring managed transactions. See the method buildSessionFactory in class<br /> # org.springframework.orm.hibernate3.LocalSessionFactoryBean and search for<br /> # the phrase "on_close" to understand how this works.<br /> #<br /> #hibernate.connection.release_mode=on_close<br /><br /> #<br /> # Set the Hibernate cache region factory. Ehcache is recommended in a<br /> # clustered environment. See the property<br /> # "net.sf.ehcache.configurationResourceName" for detailed configuration.<br /> #<br /> hibernate.cache.region.factory_class=com.liferay.portal.dao.orm.hibernate.region.SingletonLiferayEhcacheRegionFactory<br /><br /> #<br /> # This property is used if Hibernate is configured to use Ehcache's region<br /> # factory.<br /> #<br /> net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml<br /><br /> #<br /> # Configure this property if using Ehcache's default replication method for<br /> <br /> # Hibernate's region cache.<br /> #<br /> net.sf.ehcache.configurationResourceName.peerProviderProperties=peerDiscovery=automatic,multicastGroupAddress=${multicast.group.address["hibernate"]},multicastGroupPort=${multicast.group.port["hibernate"]},timeToLive=1<br /><br /> #<br /> # Set other Hibernate cache settings.<br /> #<br /> hibernate.cache.use_query_cache=true<br /> hibernate.cache.use_second_level_cache=true<br /> hibernate.cache.use_minimal_puts=true<br /> hibernate.cache.use_structured_entries=false<br /><br /><br /> #<br /> # Uncomment these properties to disable Hibernate caching.<br /> #<br /> #hibernate.cache.use_query_cache=false<br /> #hibernate.cache.use_second_level_cache=false<br /><br /> #<br /> # Set the JDBC batch size to improve performance.<br /> #<br /> # If you're using Hypersonic, you SHOULD set the batch size to 0 as a<br /> # workaround for a logging bug in the Hypersonic driver. See LPS-5426 for<br /> # more information.<br /> #<br /> # If you're using Oracle 9i, you MUST set the batch size to 0 as a<br /> # workaround for a hanging bug in the Oracle driver. See LEP-1234 for more<br /> # information.<br /> #<br /> hibernate.jdbc.batch_size=20<br /> #hibernate.jdbc.batch_size=0<br /><br /> #<br /> # Set other miscellaneous Hibernate properties.<br /> #<br /> hibernate.jdbc.use_scrollable_resultset=true<br /> hibernate.bytecode.use_reflection_optimizer=true<br /> hibernate.show_sql=false<br /><br /> #<br /> # Use the classic query factory until WebLogic and Hibernate 3 can get<br /> # along. See http://www.hibernate.org/250.html#A23 for more information.<br /> #<br /> hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory<br /><br /> #<br /> # Set this property to true to enable Hibernate cache monitoring. See<br /> # LPS-2056 for more information.<br /> #<br /> hibernate.generate_statistics=false<br /><br /><br /><br /><br />################################################################################################<br />################################################################################################<br />################################################################################################<br /><br />##<br />## Ehcache<br />##<br /><br /> #<br /> # Set the classpath to the location of the Ehcache config file for internal<br /> # caches. Edit the file specified in the property<br /> # "ehcache.multi-vm.config.location" to enable clustered cache.<br /> #<br /> ehcache.single.vm.config.location=/ehcache/liferay-single-vm.xml<br /> ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml<br /><br /> #<br /> # Uncomment the following in a clustered environment.<br /> #<br /> ehcache.multi.vm.config.location.peerProviderProperties=peerDiscovery=automatic,multicastGroupAddress=${multicast.group.address["multi-vm"]},multicastGroupPort=${multicast.group.port["multi-vm"]},timeToLive=1<br /><br /> #<br /> # Input a class name that extends<br /> # net.sf.ehcache.bootstrap.BootstrapCacheLoaderFactory. This class is used<br /> # by Ehcache to determine how caches communicate with each other in a<br /> # clustered environment.<br /> #<br /> ehcache.bootstrap.cache.loader.factory=net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory<br /> #ehcache.bootstrap.cache.loader.factory=com.liferay.portal.cache.ehcache.JGroupsBootstrapCacheLoaderFactory<br /><br /> #<br /> # Input a class name that extends<br /> # net.sf.ehcache.event.CacheEventListenerFactory. This class is used by<br /> # Ehcache to determine how caches communicate with each other in a clustered<br /> # environment.<br /> #<br /> ehcache.cache.event.listener.factory=net.sf.ehcache.distribution.RMICacheReplicatorFactory<br /> #ehcache.cache.event.listener.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory<br /><br /> #<br /> # Input a class name that extends<br /> # net.sf.ehcache.distribution.CacheManagerPeerProviderFactory. This class is<br /> # used by Ehcache to determine how caches communicate with each other in a<br /> # clustered environment.<br /> #<br /> ehcache.cache.manager.peer.provider.factory=net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory<br /> #ehcache.cache.manager.peer.provider.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory<br /><br /> #<br /> # Set this to true to enable JMX integration in<br /> # com.liferay.portal.cache.EhcachePortalCacheManager. Set this to false if<br /> # the portal needs to be reloaded under WebSphere.<br /> #<br /> ehcache.portal.cache.manager.jmx.enabled=true<br /><br /><br /> #<br /> # Set this to true to allow Ehcache to use blocking caches. This improves<br /> # performance significantly by locking on keys instead of the entire cache.<br /> # The drawback is that threads can hang if the cache is not used properly.<br /> # Make sure that all queries that return a miss also immediately populate<br /> # the cache, or else other threads that are blocked on a query of that same<br /> # key will continue to hang. Reference Ehcache's BlockingCache for more<br /><br /> # information. The blocking cache is no longer implemented by Ehcache's<br /> # BlockingCache, but by Liferay's BlockingPortalCache for better safety and<br /> # faster performance.<br /> #<br /> ehcache.blocking.cache.allowed=true<br /><br /> #<br /> # Set this to true to enable Ehcache statistics.<br /> #<br /> eh