Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-94026

UserTracker and UserTrackerPath entries are wrong after user is redirected to another node

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.0.X, 7.1.X, Master
    • Fix Version/s: None
    • Labels:

      Description

      Description:
      When one of the nodes goes down, the session is replicated to the other node therefore the user can continue his work without any interruption (due to the session replication), however the UserTracker and UserTrackerPath database entries are wrong, please see more details in reproduction steps.

      Reproduction steps:

      Preparing your cluster environment:
      Extract Liferay to two folders: node1 and node2 and follow the instructions below for both nodes:

      1) Put <distributable/> to \webapps\ROOT\WEB-INF\web.xml
      2) Open \tomcat\conf\server.xml and Find:

      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      and uncomment it.

      On the second node2 you need to change some ports:

       <Server port="8005" shutdown="SHUTDOWN">       *--->*       <Server port="9005" shutdown="SHUTDOWN">
      
      <Connector port="8080" protocol="HTTP/1.1"                         <Connector port="9080" protocol="HTTP/1.1"
       connectionTimeout="20000"                                      *--->*         connectionTimeout="20000"
       redirectPort="8443" URIEncoding="UTF-8" />                         redirectPort="9443" URIEncoding="UTF-8" />
      
       
      
          <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />  
      
            *--->*      
      
        <Connector port="9009" protocol="AJP/1.3" redirectPort="9443" URIEncoding="UTF-8" />
      

      3) Set both portal-ext.properties files to use the same database and these properties:

      #
       # See the property "cluster.link.channel.properties.control".
       #
       multicast.group.address["cluster-link-control"]=239.255.0.57
       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.58
       multicast.group.port["cluster-link-udp"]=23302
      #
       # See the property "cluster.link.channel.system.properties".
       #
       multicast.group.address["cluster-link-mping"]=239.255.0.59
       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.60
       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.61
       multicast.group.port["multi-vm"]=23305
       
      ###Storing user access data
      live.users.enabled=true
      session.tracker.persistence.enabled=true
      session.tracker.memory.enabled=true
      session.tracker.friendly.paths.enabled=true
      
      cluster.link.enabled=true
      ehcache.cluster.link.replication.enabled=true
      lucene.replicate.write=true
      

      Reproduction steps:
      1) Start node1, wait for the successful startup
      2) Start node2, wait for the successful startup
      3) Go to the VM, open Chrome and type: localhost then hit enter then log in
      4) Go to Control Panel -> Server Admin -> Scripts, Select Groovy language, and execute the following command: System.out.println("I'm using this node");
      5) Go to Control Panel -> User Management -> Monitoring, see that the session is there (expected behavior)
      6) Check the console logs and find "I'm using this node" message and shut that node down
      7) Refresh the browser and see that the session replication worked, the user is not logged out, it is redirected to the other node (expected behavior)
      Result:
      Check the UserTracker table, there is a new entry, but there is no related entries in the UserTrackerPath table

      8) Log out with your user and check the UserTracker and UserTrackerPath entries, there are no new entries
      Expected behavior: when the session ends there should be entries in the UserTrackerPath table

      Reproduced on master: private b3be1b0b4001506e38594faf39497cb2e68627c1

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  24 weeks, 5 days ago

                  Packages

                  Version Package