Skip to Content
Technical Articles
Author's profile photo Sudhir Kumar

How to know the current logged instance/node in SAP AS JAVA when login through Load Balancer

How to know the current logged instance/node in SAP AS JAVA when login through Load Balancer

Background:

I came across to know that when I am login to SAP AS Java with Load balancer URL, It does not give me the idea of the current Java Instance where the load balancer redirects.

Load balancer is being used to balance the load between the different Java instances and server process.

After login to SAP Java portal through the load balancer URL, It redirects to the available Java instance internally. But it can not be seen in browser that it is redirecting to which Java instance.

This blog will guide you to know the current Java instance where user is logged in after login through Load balancer URL.

How to check:.

Below are the steps to know the current logged in instance when logging through Load Balancer URL.

1.Login to NWA with Load balancer URL http://<Load-Balancer-URL>/nwa

2. Execute the command “javascript:document.cookie” in the same browser where you have logged in.

3. You will see the output in the same browser, just check for the below line in the output.

4. This ID J2EE21493 is the instance ID of the corresponding Java instance.

5. This Instance ID can be verified from NWA, Operations->Start & Stop

Here you can see the Instance ID 21493 is assigned for a specific host/instance which can be seen from the above screen

Conclusion:

In this way one can find the current logged in instance in SAP AS JAVA when login through Load Balancer.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Todor Petrov
      Todor Petrov

      Hi Sudhir,

      good article. Thanks for that.

      In recent release of Chrome however the document.cookie is not delivering the expected result.

      There is a workaround to that -> if you are running Chrome - just execute this in the URL -> "chrome://settings/siteData?search=cookie"

      This will deliver all cookies stored in Chrome. Search for the SAP host name and look for the cookie - saplb_*, which will point to the node on which you are on.

      BR,

      Todor