Connect to SAP load balancing server

It turns out SAP is leveraging the same concept as BizTalk load balancing concept, with a message server and buntch of application servers. The connection should be setup to the message server instead of the specific application server behind it. This is something new, took me sometime to figure it out.

Steps below,

  • Change the saprfc.ini to include the message server as type B connection
  • Update the windows\drivers\etc\services file with message server address

References,

But you need to use a syntax that is a bit different, like:

MSHOST=MSGSVR_ALIAS R3NAME=APPSVR_NAME GROUP=“logongroup” CLIENT=XXX SYSNR=XX

In which

MSHOST = Central Instance of SAP system.

R3Name = System Name

Group = Logon Group defined in the SAP system for your application.

To use logon groups, you need to make sure that your connecting to the messaging server, rather than to the application server host.

(Generally the message server has a name ending with “00” as system number…)

Before you can use that loadbalancing string, you need to add the required entries in the services file. (meaning %WINDIR%\System32\Drivers\etc\services file)

32xx = Dialog Server

33xx = Gateway Server

36xx = Message Server

In this case we added (amongst many others for other application servers)

sapdp00           3200/tcp

sapdp30           3230/tcp

sapgw00           3300/tcp

sapgw30           3330/tcp

sapmsQD0        3600/tcp

sapmsD30        3630/tcp

So we used the loadbalancing connection string: MSHOST=eccdev R3NAME=D30 GROUP=”Test” CLIENT=510 SYSNR=30

But initially this didn’t work neither.

The ERPMA Configuration tool could not connect to the message server.

And MIIS threw an error, at import: “The extensible extension returned an unsupported error in MIIS.”

The stack trace is:

“Microsoft.MetadirectoryServices.ExtensibleExtensionException: Connect to message server failed

Connect_PM MSHOST=eccdev, R3NAME=D30, GROUP=Test

ERROR service ‘sapmsD30’ unknown

TIME Thu Nov 15 13:11:37 2007

RELEASE 640

COMPONENT NI (network interface)

VERSION 37

RC -3

MODULE ninti.c

LINE 505

DETAIL NiPGetServByName2: service ‘sapmsD30’ not found

SYSTEM CALL getservbyname_r

COUNTER 1

at Microsoft.MetadirectoryServices.ERP.SAPMA.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData)

Microsoft Identity Integration Server 3.2.0559.0″

The system/service sapmsD30 could not be pinged.

For testing purposes we added sapmsD30 to the hostfile with the IP address of the message server eccdev.

Then MIIS threw an error while importing:

The stack trace is:

“Microsoft.MetadirectoryServices.ExtensibleExtensionException: Connect to message server failed

Connect_PM MSHOST=eccdev, R3NAME=D30, GROUP=Test

ERROR service ‘?’ unknown

TIME Thu Nov 15 13:16:23 2007

RELEASE 640

COMPONENT NI (network interface)

VERSION 37

RC -3

COUNTER 1

at Microsoft.MetadirectoryServices.ERP.SAPMA.GenerateImportFile(String fileName, String connectTo, String user, String password, ConfigParameterCollection configParameters, Boolean fFullImport, TypeDescriptionCollection types, String& customData)

Microsoft Identity Integration Server 3.2.0559.0″

A known issue is causing error messages similar to this message

The installation of MSN Messenger 7.5 changes the following Registry value from REG_EXPAND_SZ to REG_SZ:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath (this value contains the location of the ‘services’ file)

The solution is to delete the value and recreate it as REG_EXPAND_SZ.

But MSN Messenger was not used on this MIIS Server and the registry key was correct.

When searching the internet for “ERROR service ‘?’ unknown”, I found: https://www.sdn.sap.com/irj/sdn/message?messageID=997314

(SDN = SAP Developer Network)

In that post, one of the users, mentions that the services file (in %windir%\system32\drivers\etc) should not use spaces but tabs.

On the MIIS Server I made a copy of the service file (for backup).
Then I killed all spaces (not in comment sections), replacing the ‘spaced’ column layout by a “tabbed” column layout (actual 1 tab).

For example “sapdpxx <many spaces> 32xx/tcp” changed to “sapdpxx <1 tab> 32xx/tcp”

After saving the changes to the services file, the MIIS import of the ERPMA succeeded, using the SAP load balancing connection…page counter