-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, Master
-
Fix Version/s: 7.0.0 DXP FP38, 7.0.0 DXP SP7, 7.0.5 CE GA6, 7.0.X, 7.1.0 M1, 7.1.X, Master
-
Component/s: Fault Tolerance > Clustering Framework
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Story Points:1
-
Fix Priority:3
- Prepare a two-node Liferay cluster pointing to a shared database (it's simpler to deploy master-private than master for this purpose). If you only have one computer, you can follow these steps to have a simple unicast cluster with master-private:
- Duplicate your LIFERAY_HOME folder (Tomcat folder, OSGi folder, etc.) to create two nodes
- Update server.xml on each node to use different ports (use 81xx on node1 and use 82xx on the node2)
- Update portal-ext.properties so both use a shared database
- Update portal-ext.properties to also contain the following entries related to clustering:
cluster.link.autodetect.address= cluster.link.enabled=true cluster.link.channel.properties.control=tcp.xml cluster.link.channel.properties.transport.0=tcp.xml
- Add the following to setenv.sh to setup jgroups for clustering:
CATALINA_OPTS="${CATALINA_OPTS} -Djgroups.bind_addr=127.0.0.1 -Djgroups.tcpping.initial_hosts=localhost[7801],localhost[7802],localhost[7803],localhost[7804]"
- Make sure to deploy the clustering modules to both nodes
- Add the attached com.liferay.portal.cache-log4j-ext.xml
to the osgi/log4j folder on both nodes
- Start up one node in the cluster and let it populate your database
- Start up the second node
- Navigate to the home page on node 1 http://localhost:8180/ and note that the following is logged on node1
02:29:55,606 DEBUG [http-nio-8080-exec-6][WebServerServletToken:126] Put 0 into com.liferay.portal.kernel.webserver.WebServerServletToken 02:29:55,608 DEBUG [http-nio-8080-exec-6][WebServerServletToken:126] Put 20175 into com.liferay.portal.kernel.webserver.WebServerServletToken
- Navigate to the home page on node 2 http://localhost:8280/ and note that the following is logged on node1
02:32:14,916 DEBUG [liferay/cache_replication-128][WebServerServletToken:146] Removed 20175 from com.liferay.portal.kernel.webserver.WebServerServletToken 02:32:14,916 DEBUG [liferay/cache_replication-123][WebServerServletToken:146] Removed 0 from com.liferay.portal.kernel.webserver.WebServerServletToken
- Navigate to the home page on node 1 http://localhost:8180/ and note that the following is logged on node1
02:32:55,049 DEBUG [http-nio-8080-exec-5][WebServerServletToken:126] Put 0 into com.liferay.portal.kernel.webserver.WebServerServletToken 02:32:55,051 DEBUG [http-nio-8080-exec-5][WebServerServletToken:126] Put 20175 into com.liferay.portal.kernel.webserver.WebServerServletToken
- Repeat steps 7 and 8 multiple times and observe that this pattern continues.
Expected Results:
The caches stay populated on node 1 when a page is accessed on node 2.
Actual Results:
When you access a page on node 2, cache entries are removed on node 1.
- causes
-
LPS-77803 Some caches' clustering properties are no longer configurable
- Closed