Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-5565

PunchOut2Go connector issue in a clustered environment

    Details

      Description

      In the clustered env, randomly the PunchOut URL takes the user to a login screen instead of the catalog plus the following exception occurs:

      Exception in thread "default-2" com.liferay.portal.kernel.exception.SystemException: Unable to send unicast message
      at com.liferay.portal.cluster.multiple.internal.jgroups.JGroupsClusterChannel.doSendMessage(JGroupsClusterChannel.java:191)
      at com.liferay.portal.cluster.multiple.internal.BaseClusterChannel.lambda$sendUnicastMessage$1(BaseClusterChannel.java:65)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: Unable to write ordinary serializable object {multicast=false, payload=

      {arguments=[com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken@1f8c0c5f], methodKey=com.liferay.commerce.punchout.oauth2.provider.rest.internal.bearer.token.provider.PunchoutAccessTokenProviderImpl._putPunchoutAccessToken(com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken)}

      , skipLocal=false, _targetClusterNodeIds=[d024fb7e-b977-c387-0cb3-36bfb260b2e2], uuid=faf45312-832f-bfed-cb89-99ff725aaf56}
      at com.liferay.portal.cluster.multiple.internal.io.ClusterSerializationUtil.writeObject(ClusterSerializationUtil.java:77)
      at com.liferay.portal.cluster.multiple.internal.jgroups.JGroupsClusterChannel.doSendMessage(JGroupsClusterChannel.java:174)
      ... 4 more
      Caused by: java.io.NotSerializableException: com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      at com.liferay.portal.cluster.multiple.internal.io.ClusterSerializationUtil.writeObject(ClusterSerializationUtil.java:70)
      ... 5 more
      2021-01-29 15:46:17.708 ERROR [http-nio-8080-exec-2][PunchoutAccessTokenProviderImpl:75] Timeout setting punchout access token to master node
      Exception in thread "default-26" com.liferay.portal.kernel.exception.SystemException: Unable to send unicast message
      at com.liferay.portal.cluster.multiple.internal.jgroups.JGroupsClusterChannel.doSendMessage(JGroupsClusterChannel.java:191)
      at com.liferay.portal.cluster.multiple.internal.BaseClusterChannel.lambda$sendUnicastMessage$1(BaseClusterChannel.java:65)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.RuntimeException: Unable to write ordinary serializable object {multicast=false, payload=

      {arguments=[com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken@798a7d11], methodKey=com.liferay.commerce.punchout.oauth2.provider.rest.internal.bearer.token.provider.PunchoutAccessTokenProviderImpl._putPunchoutAccessToken(com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken)}

      , skipLocal=false, _targetClusterNodeIds=[d024fb7e-b977-c387-0cb3-36bfb260b2e2], uuid=e70ca913-0c50-89e4-fbfd-86858b4fe196}
      at com.liferay.portal.cluster.multiple.internal.io.ClusterSerializationUtil.writeObject(ClusterSerializationUtil.java:77)
      at com.liferay.portal.cluster.multiple.internal.jgroups.JGroupsClusterChannel.doSendMessage(JGroupsClusterChannel.java:174)
      ... 4 more
      Caused by: java.io.NotSerializableException: com.liferay.commerce.punchout.oauth2.provider.model.PunchoutAccessToken
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1378)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      at com.liferay.portal.cluster.multiple.internal.io.ClusterSerializationUtil.writeObject(ClusterSerializationUtil.java:70)
      ... 5 more

      Steps to reproduce:
      1. Install Punch-Out Connector on each node by using this documentation: https://docs.google.com/document/d/1HigmNMxfyv77DQRcfdA2rjiYwCuue2T39A05CaRFkTU/edit#heading=h.3fa1i3x90gt8
      2. On the slave node call REST endpoint for creating Punch-Out session via Postman
      3. On the master or node call via browser punchOutStartURL that is the part of result of the previous action

      Expected Result:
      User should be automatically logged into Commerce

      Actual Result:
      User is redirected to the Login page

        Attachments

          Activity

            People

            Assignee:
            lorenzo.lapescara Lorenzo La Pescara
            Reporter:
            ivica.cardic Ivica Cardic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                7.4 CE GA1
                Master
                7.3.X
                7.1.x
                7.4.x