SAP Knowledge Base Article
1660720 - Session remains open after the logoff on enterprise portal (troubleshooting
using HTTP Trace)
Component: EP-PIN-AI-SRA (Session Release Agent), Version: 4, Released On: 22.02.2021
Symptom
The sessions on ABAP/R3 remain open after closing the browser or clicking on logoff in the portal.
Environment
SAP NetWeaver Application Server Java
Enterprise Portal
An integrated 'backend' application such as a Web Dynpro Java or ABAP application, BSP, BW Application, IAC or SAP
GUI for HTML ('WebGUI').
Reproducing the Issue
1. Log on to the Enterprise Portal;
2. Call the backend application through the relevant iView;
3. log off, close the browser window or navigate away;
4. Verify that the session remains open on the backend (e.g. using transaction SM04 for sessions on an ECC system, or
HTTP Session Overview for WDJ sessions on an AS Java).
Cause
The portal is not directly responsible for closing any connection on a backend.
The Portal SRA (session release agent) is responsible for notifying web applications of portal events (navigation / logoff / page
close). The application's session management then must determine how to handle this notification (closing sessions,
releasing locks).
Note that the SRA only knows about web sessions opened by the portal. Additional RFC sessions which may have been
opened by the application are the responsibility of the application itself.
To confirm where to focus the investigation, it is necessary to check if a web session is opened by the portal and if the portal is
notifying the application of the navigation/logoff/browser close event. See Resolution session of this document.
Resolution
How to check if the SRA is notifying the application that it should close some sessions:
1. Create an HTTP trace, reproducing the issue (clicking on the log-off button). We recommend the use of Fiddler for this.
See SAP Note 2907460 - How to generate a Enterprise Portal Fiddler network trace
2. Make sure that your session remains open on the backend
3. Find in the list of URLs within the HTTP trace a URL like: http://<portal>.com:
<port>/irj/servlet/prt/portal/prtroot/com.sap.portal.dsm.Terminator
4. In the previous URLs, you will probably be able to see the following flag when calling the application:
sap-sessioncmd: USR_ABORT, USR_LOGOFF, USR_SUSPEND
e.g.: http:// <portal>.com:<port>/webdynpro/dispatcher/sap.com/tc~kmc~bc.uwl.ui~wd_ui/UWL;jsessionid=
(J2EE4818000)ID0402550750DB6f6ec8f725e2c284a35c1e982d464551c4ac023cEnd?sap-ext-
sid=sHmmp3gh2pvoOCvkwj8Whw--2Lu9*btmg7xmg2UNrfAhwQ--&sap-wd-cltwndid=WID1311085687218&sap-
sessioncmd=USR_LOGOFF&~SAPSessionCmd=USR_LOGOFF&SAPWP_ACTIVE=1&sap-ep-
tstamp=1322572863240&dsmguid=1322572889094
or
e.g.: http://<portal>.com:<port>/sap/public/bc/icf/logoff?keepMYSAPSSO2Cookie=true&dsmguid=xxxx
If the mentioned calls can be seen, it means that the portal session release mechanism is working and the investigation
must be made on Application side.
If the following calls could not be found, check the SAP Notes below:
596698 Session Release Agent - Typical Problems & Troubleshooting
1331353 Session Release Agent - Pop-Up Blockers
Keywords
SRA, Session Release Agent, DSM, logoff, log off, not released on backend, SM04
This document refers to
SAP Note/KBA Title
2907460 How to generate a Enterprise Portal Fiddler network trace
This document is referenced by
SAP Note/KBA Title
2384318 Webdynpro Java RFC session remains open in SM04 when it is not in use anymore
2288635 Portal session in a tab not terminated if tab is closed without logging off
1515455 How to activate debug mode in Portal