Details

      Description

      1. 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:
        1. Duplicate your LIFERAY_HOME folder (Tomcat folder, OSGi folder, etc.) to create two nodes
        2. Update server.xml on each node to use different ports (use 81xx on node1 and use 82xx on the node2)
        3. Update portal-ext.properties so both use a shared database
        4. 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
          
        5. 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]"
          
      2. Make sure to deploy the clustering modules to both nodes
      3. Add the attached com.liferay.portal.cache-log4j-ext.xml to the osgi/log4j folder on both nodes
      4. Start up one node in the cluster and let it populate your database
      5. Start up the second node
      6. 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
        
      7. 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
        
      8. 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
        
      9. 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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 25 weeks, 4 days ago

                  Packages

                  Version Package
                  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