Monday, November 7, 2011

Salesforce :- “INVALID_SESSION_ID: Invalid Session ID found in SessionHeader”

 

We have other system integrated with Salesforce using integration users. Recently we across error message after deploying new integration process in production instance. After looking deep into new deployed code, we found that we are using logoff in newly deployed integration.

Adding log off shouldn’t cause problem but if you go thru below then you will understand it is true.

  1. Organization wide we have one single IP exposed to outside world.
  2. Salesforce ties up the session to user id and ip address from where it is initiated. Salesforce has setting to tie up session id to source IP address. Setup > Security Control > Session Setting. We have this setting false, still salesforce ties up session to IP as organization wide we have single IP exposed.
  3. Web application side, we were logging only once and all other instances were reusing the same session id or instance.
  4. We did not faced this issue in TEST environment as there wasn’t enough load happening
  5. Were able to figure out the issues using below pictorial method.
    image 

Application Instance consist of following

  1. Apps I
    1. Login
    2. Process
  2. Apps 2 –
    1. Login
    2. Process
    3. Log off

We resolved this issue by removing logoff from newly deployed integration. Another approach was to use separate integration user which is not realistic as we will be needing to maintain multiple user and their user id, password and security token.

No comments:

Post a Comment