Share via


ILM/MIIS Troubleshooting: SAP Load Balancing Connection String

Scenario

While running a project with ILM 2007 (MIIS) connectecting to a SAP system, we needed to make sure that MIIS connects to a SAP system with SAP load balancing.

Initially we used a direct connection to a development server using the default connection string that Microsoft suggests, like ASHOST=D30 SYSNR=30 CLIENT=510.

But if we tried to connect using the suggested load balancing string by Microsoft (in online help of ERP MA), the ERP MA throws an error :

Application error occurred.

An error occurred while connecting to ERP server.

Max. lMax. length for ID/Value exceeded '\è[]...' 

SAP Error screenshot

Error details 

If you save the configuration (with direct connection string), and run an import on MIIS, MIIS throws an error.

“The extensible extension returned an unsupported error in MIIS. 

 The stack trace is: 

 "Microsoft.MetadirectoryServices.ExtensibleExtensionException: Connect to SAP gateway failed 

Connect_PM  GWHOST=D30, GWSERV=sapgw00, ASHOST=D30, SYSNR=00 

LOCATION    CPIC (TCP/IP) on local host 

ERROR       partner not reached (host 10.0.0.1, service 3300) 

TIME        Thu Sep 27 13:35:24 2007 

RELEASE     640 

COMPONENT   NI (network interface) 

VERSION     37 

RC          -10 

MODULE      nixxi_r.cpp 

LINE        8605 

DETAIL      NiPConnect2 

SYSTEM CALL SiPeekPendConn 

ERRNO       10061 

ERRNO TEXT  WSAECONNREFUSED: Connection refused 

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" 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.” 

Solution

With assist of MS PSS (Thanks, José!), we found the solution to the problem.

FYI, loadbalancing in SAP, allows to fail over a SAP application server to another running instance of the SAP server.

Instead of connecting directly to the application host, you connect to the SAP message server, which forwards the connection to the active server.

If you look into the help of the ERP Management Agent Configuration Tool, look for 'load balancing'.

Strangely enough, "Known Issues" is shown, but never mind.

It says, I quote, "

For load balancing purposes, application servers within SAP system are usually group together to support different kinds of users; these groups are known as logon groups. To specify a logon group for the ERP MA, you must specify the group within the ERP MA connection string. Contact the SAP administrator for the correct connection string for this purpose.

For reference, the below sample shows a connection string which specifies the 'SAPADM' logon group:

/M/mySap.sap-ag.de/S/4253/G/SAPADM

'/M/' (message server host name

'/S/' (message server port)

'/G/' (logon group)"

 

But it does not tell you that there is another option to use a loadbalancing string, very much alike the normal (direct) SAP connection string example that is displayed by the tool (ASHOST=host SYSNR=## CLIENT=###).

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...http://c.statcounter.com/6324025/0/4776b52c/1/

http://c.statcounter.com/6303827/0/96db3c92/1/


See Also