Issue
- From one of the nodes, when uploading a document or creating web content, it's available under the content section in the other node. But when creating a page, adding the uploaded docs and existing web content on the page, it's not getting reflected in the other node until and unless manually clearing the content cache across the cluster or restarting the server.
Environment
- Liferay DXP 7.0 SP11 with FP80
Resolution
-
Steps to reproduce the behavior using vanilla bundle:
- 2 node Liferay cluster environment with the same patch level in both the nodes
- Configure the same database, same file repository [Simple file system for the testing purpose] for two nodes
- Add the properties "cluster.link.enabled=true", "cluster.link.autodetect.address=www.google.com:80" in the portal-ext.properties
-
Additional steps
-
After enabling the cluster link in all the nodes, the available nodes will able to send the messages/ heartbeats to each other.
- Cluster Link depends on JGroups. Hence, download the latest Jgroups.jar. Please refer here for more information on the same.
- From the downloaded jgroups.jar, under the JAR’s
libfolder, you can find thejgroups-[version].Final.jar. Extract it and findtcp.xml. Extract this tcp.xml file to a location accessible to Liferay DXP and place it under $LIFERAY_HOME/tomcat-XXX/webapps/ROOT/WEB-INF/classes folder for both the nodes. -
Follow the 4th steps from the document. Open the tcp.xml file and Configure the
<TCP bind_port="[some unused port]"
...
/> like TCP bind_port="7800" -
Follow the 5th steps from the document. Set the parameter singleton_name="liferay_tcp_cluster" to the same tag in the above. Note: This name should be same in both nodes.
-
In the tag <TCPPING async_discovery="true", set initial_hosts="${jgroups.tcpping.initial_hosts:IP_of_node1[7800],IP_of_node2[7800]}" for both the nodes with the respective IP and let the port to be same for both.
-
Follow the 6th steps from the document. To enable the above configuration, add the below properties in global configuration file i.e. portal-ext.properties for both nodes with the respective path of the tcp.xml file.
cluster.link.channel.properties.control=[CONFIG_FILE_PATH]/tcp.xml
cluster.link.channel.properties.transport.0=[CONFIG_FILE_PATH]/tcp.xml -
Follow the UNICAST OVER TCP configuration section from the document:
-
Open Setenv.bat (Setenv.sh in case of Linux) and make following changes in CATALINA_OPTS for both nodes
-
-Djgroups.bind_addr=IP_of_respective_node -Djgroups.tcpping.initial_hosts=IP_of_node1[7800],IP_of_node2[7800]After following the above configuration, start the node one by one. Please ensure that you have deleted the temporary, OSGi/state directories if any from both the nodes.
-
Additional Information