cancel
Showing results for 
Search instead for 
Did you mean: 

NetWeaver AS Java 7.40 Load Balancing

Former Member
0 Kudos

Here is a little background on what I believe is going on and what I am trying to achieve. We have a web application deployed to a NetWeaver AS Java 7.40 eight node cluster, which can kick of a couple types of jobs. The one job is rather intensive in the sense that it involves a decent amount of web traffic via RabbitMQ messages and REST calls. When this job is running our web app becomes a tad unresponsive. It seems subsequent AJAX calls are not processed until this job is finished, which I am guess is because each node is backlogged with requests to handle. With this suspicion in mind, I would like to possible use server groups or logon groups to keep certain REST calls from only being handled by a subset of the nodes in the cluster or maybe something else along these lines. My limited understanding of the logon groups in NetWeaver makes me believe that this could be used to allow 1 or 2 nodes to always be available to process requests from the web app.

I have already tried tweaking some of the ICM and Web Dispatcher profile parameters by appending the following to /usr/sap/RL3/SYS/profile/DEFAULT.PFL:

#-----------------------------------------------------------------------
# Custom Parameters
#-----------------------------------------------------------------------
icm/max_conn = 1000
icm/max_threads = 1000
icm/req_queue_len = 10000

wdisp/info_timeout = 61

I did find where to add Logon Groups in NWA, but its not clear to me how to configure one and how to make it work. I went to NWA --> Configuration --> Infrastructure --> Java HTTP Provider Configuration --> Logon Groups tab

At this point, I added one node to the "Instances" for a new Logon Group I created and for the "Prefixes" tab I added "/security-service" which I was hoping to get all of our REST calls in the format of "http://rl3nw74:50000/security-service/..."

This does not seem to be working though. Do I need to configure a URL mapping in some property file somewhere or do something else?

Thanks,

Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

sunny_pahuja2
Active Contributor
0 Kudos

Hello,

You should use web dispatcher for load balancing.Please check below link for load balancing using server groups.

http://help.sap.com/saphelp_nwce711/helpdata/en/48/8fe37933114e6fe10000000a421937/frameset.htm

Thanks

Sunny

Former Member
0 Kudos

Hi Sunny,

Thanks for taking some time to respond. As I understand it, "logon groups" are a part of the Web Dispatcher's Load Balancing. Therefore, I am looking for a better description of how to configure logon groups to work based off of certain URL patterns/prefixes. Could you please describe in more detail than the help documentation, as it does not clearly state how or where to make such configurations?

Thanks,

Kevin

Former Member
0 Kudos

Hi Kevin,

It is possible to make logon group based load balancing work for Java servers. In addition the Java server configuration, it is necessary to configure the web dispatcher properly for this to work. For details, please refer to note 1127717 and the online documentation,

http://help.sap.com/saphelp_nw73/helpdata/en/4a/93c8ceedaa388fe10000000a42189c/content.htm

Best regards,

Jun

Former Member
0 Kudos

Hi Jun,

I have seen this link several times, but it is incomplete in my opinion. It does not explain what are appropriate values for

wdisp/J2EE/group_info_location and wdisp/J2EE/url_map_location

This link makes it sound like they should be a URL, but what URL? There is also wdisp/group_info_location and wdisp/url_map_location set to some file path, but they do not use the "J2EE" in the parameter names. Are these two parameters needed as well? Can this file just be any file on the master node in the cluster? Or, does it have to go in a specific folder on every server in the cluster?

From the same link, I'm guessing the /usr/sap/RL3/SYS/profile/DEFAULT.PFL would have two lines in it like the following:

#-----------------------------------------------------------------------
# Custom Parameters
#-----------------------------------------------------------------------
wdisp/group_info_location = file://usr/sap/RL3/SYS/profile/group_info_location.cfg
wdisp/url_map_location = file://usr/sap/RL3/SYS/profile/url_map_location.cfg

And then each of these files would be created and maybe look like (based on the default values):

/sap/public
/icf_info
/icr_groups
/security-service

Would this be correct for intercepting all REST calls of the form "http://rl3nw74:50000/security-service/...". Why do they have the same default values (what is the difference/purpose of each these parameters)? Is the following screen show a properly configure "logon group" given the above examples?

former_member193518
Active Participant
0 Kudos

Hi Kevin,

The URL that Jun provided (http://help.sap.com/saphelp_nw73/helpdata/en/4a/93c8ceedaa388fe10000000a42189c/content.htm)

states that you should use the following as the URLs:

"We recommend that you use the following value to configure the GroupInfoRequest property:

/J2EE/icr_groups

We recommend that you use the following value to configure the UrlMapRequest property:

/J2EE/icr_urlprefix"

The basic steps are:

1, Configure the HTTP Provider as per here:
http://help.sap.com/saphelp_nw73/helpdata/en/4a/93c8ceedaa388fe10000000a42189c/content.htm

This will allow you to access those URLs (http://<your server>:<port>:/J2EE/icr_groups) to obtain a list of groups.

2, Configure the groups themselves.
See here: http://help.sap.com/saphelp_nw73/helpdata/en/4a/954cac17335ff9e10000000a421937/content.htm

This will then allow you to SEE the groups and the Java Servers when you do call your URL (http://<your server>:<port>:/J2EE/icr_groups).

3, Configure Web Dispatcher with the GroupInfoRequest and UrlMapRequest properties in it's profile file.  The values will be the same values you defined in step #1.

4, Configure Web Dispatcher to route specific URL prefixes to your specific logon groups.

You will need to see here for this: http://help.sap.com/saphelp_nw74/helpdata/en/48/99cb747f020e27e10000000a421937/content.htm

You should note the security warnings about the information that can be seen when you query those new J2EE URLs for groups and prefixes.

Hopefully that might help you out a little more.

Former Member
0 Kudos

Hi Darryl, thanks for the pointers, but I had already seen these documents. However, the description of how to get to the icr_groups link was a nice bonus and not well described in any of those links.

The root cause of the my issue with the web dispatcher problems turns out to be that the Web Dispatcher actually wasn't really installed and or running to begin with. Its very strange to me how the documentation neglects to inform you how to confirm this as this would seem to be the first step.

This link explains how to do just that: link

This supposedly is configured with the following file after running the bootstrap: /usr/sap/RL3/J00/exe/sapwebdisp.pfl, but it does not seem to be picking up my changes for the load balancing strategy.

The bootstrap was done like so:

> /usr/sap/RL3/SYS/exe/run/sapwebdisp pf=/usr/sap/RL3/J00/exe/sapwebdisp.pfl -bootstrap

SAP Web Dispatcher Bootstrap

============================

This bootstrap will perform the following steps:

1. create profile file "sapwebdisp.pfl" for SAP Web Dispatcher (if not already existing)

2. create user for web based administration in file "icmauth.txt" (if not already exisiting)

3. start SAP Web Dispatcher with the created profile

After the bootstrap you can use the web based administration

Generating Profile "sapwebdisp.pfl"

Hostname of Message Server (rdisp/mshost): 10.2.95.53

HTTP Port of Message Server (ms/http_port): 8101

Checking connection to message server...OK

Unique Instance Number for SAP Web Dispatcher (SAPSYSTEM): 6

HTTP port number for SAP Web Dispatcher: 9101

Create configuration for s(mall), m(edium), l(arge) system (default: medium):

Profile "sapwebdisp.pfl" generated

Authentication file "icmauth.txt" generated

Web Administration user is "icmadm" with password "5W7VVwcE"

Restart sapwebdisp with profile: sapwebdisp.pfl

sapwebdisp started with new pid 24864

Web administration accessible with "http://rl6nw74:9101/sap/wdisp/admin"

SAP Web Dispatcher bootstrap ended (rc=0)

rl6nw74:rl3adm 53> sapscsa(5):24864: I am "            ", but should be "sapsys      ".

sapscsa: system(./sapmscsa pf=sapwebdisp.pfl );

./sapmscsa=>sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline

sapcscsa: SCSA defined. sapscsaId == 2293782 == 00230016  perm == 416

sapcscsa: SCSA attached at address 7fbafbdd0000

sapcscsa: SCSA initialized.

./log/SLOG06: No such file or directory

rslgwr1(20): rstrbopen cannot open pre-existing SysLog file.

./log/SLOG06: No such file or directory

rslgwr1(11): rstrbopen cannot open SysLog file.

SysLog:iE1020130920135719002486700000salocalhosrl3adm     

      :                    sapmscsa                                0000

      :SCSA         4096                                              

./sapmscsa: finished.

./log/SLOG06: No such file or directory

rslgwr1(11): rstrbopen cannot open SysLog file.

SysLog:mIM120130920135719002486400000IC                   

      :                                                               0

      :SAP Web Dispatcher&rl6nw74&24864&     IcmInitStartupicxxman.1936

*** SAP Web Dispatcher up and operational (pid: 24864, HTTP: 9101, HTTPS: -) ***

Is 9101 a valid port for the Web Dispatcher?

former_member193518
Active Participant
0 Kudos

Hi Kevin,

Yes, 9101 (you're sneaking through the firewall I see) is a valid port.

It should work on any valid TCP port.

The log says that it's up and working.

Can you see that it's listening on 9101?    "netstat -an | grep 9101"

You need to configure that sapwebdisp.pfl file to now re-direct to the ICM of a SAP message server, or route to somewhere at least.

Check the help.sap.com  for the SAP WebDispatcher config setup:  http://help.sap.com/saphelp_nw74/helpdata/en/48/8fe37933114e6fe10000000a421937/content.htm?frameset=...

You can administer it via http://rl6nw74:9101/sap/wdisp/admin  then use the password "5W7VVwcE" for icmadmin user.

Regards,


Darryl

Former Member
0 Kudos

Hi Darryl,

Thanks for the feedback. I was able to get logged into the http://rl6nw74:9101/sap/wdisp/admin. And I can confirm that the Web Dispatcher is up with:

rl6nw74:rl3adm 82> netstat -an | grep 9101

tcp        0      0 0.0.0.0:9101                0.0.0.0:*                   LISTEN     

unix  2      [ ACC ]     STREAM     LISTENING     76744  /tmp/.sapicm9101

The part about "You need to configure that sapwebdisp.pfl file to now re-direct to the ICM of a SAP message server, or route to somewhere at least" is not clear to me. I thought  during the bootstrap I configured this? Here is a snippet of my sapwebdisp.pfl:

# Accessibility of Message Servers

rdisp/mshost = 10.2.95.53

ms/http_port = 8101

# SAP Web Dispatcher Ports

icm/server_port_0 = PROT=HTTP,PORT=9101

icm/server_port_1 =

former_member193518
Active Participant
0 Kudos

OK, that looks good.

The only thing I would say is that you would be better off putting a hostname in there instead of an IP address, but it hopefully should be OK with an IP.

You mention it's not picking up the new load balancing changes.

Can you tell me how you diagnosed that?

- Can you confirm that 8101 is the HTTP message server for the Java stack (not the ABAP stack)?

- Can you increase the Web Dispatcher trace level, restart it and try again?

- Check the Web Dispatcher trace file for clues to see if it is picking up the routing rules?

Darryl