cancel
Showing results for 
Search instead for 
Did you mean: 

Ariba punchout Session not retrieved for multiple nodes

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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?

Former Member
0 Kudos

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.