Skip to Content
author's profile photo Former Member
Former Member

Ariba punchout Session not retrieved for multiple nodes

Hello, As explained in attached diagram our test environment is running on two nodes. Our load balancer is using sticky sessions. PunchoutSetupRequest(POSR) comes to hybris from Ariba and DefaultPunchOutSessionService puts populated POSR in user session. Session id is retrieved from the http session and is appended to the login URL. This login URL is sent to buyer in PunchoutSetupResponse. Now buyer is redirected directly to hybris system via login url in response. Since two request are from different IP addresses requests are sometimes redirected to different nodes. In that case session retrieval fails since session was created on other node and exception is thrown. Would anyone please let me know how to fix this issue? Are we using hybris b2bPunchout incorrectly? Thanks. Regards

alt text

3861-punchout.jpg (49.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 16, 2015 at 11:47 AM

    Hey Sunny, have you got any solution about this? actually we're facing the same error, jalosession can not be shared in a cluster env.

    does anyone know how to solve this?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Young, I saw your comment very late. To fix this issue did following customization.

      • Created a type PunchOutSessionModel with attribute sessionId and MediaModel.

      • Saved in PunchOutSession object in Media as a serialized object(Using Media Service) instead of session.

      • Saved sessionId and MediaModel in PunchOutSessionModel .

      • Once customer is redirected we retrieve Media from PunchOutSessionModel on the basis of sessionId.

      • PunchoutSession object is retrieved from Media and deserialized.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2017 at 06:10 PM

    Hi Sunny Can you copy paste your approach with CODE so that we are clear

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 30, 2018 at 04:22 PM

    This is because the DefaultCipherService adds the Key and the Salt to the PunchOutSession object as part of the PopulateResponsePunchOutProcessingAction but doesn't persist the PunchOutSession object after doing so (i.e. using modelService.save). Our solution was to persist the Key and Salt that are used to encrypt the UserID in the PunchOut Session url when the rest of the attributes are added to the PunchOutSession object in the PunchOutSessionPopulator.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.