How to resolve error(service sapms<SAPServerSystemName> unknown) occured on PCF and Docker environment while using Load Balanced Client Connection with SAP Plugin

How to resolve error(service sapms<SAPServerSystemName> unknown) occured on PCF and Docker environment while using Load Balanced Client Connection with SAP Plugin

book

Article ID: KB0082715

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for SAP Solutions 8.x

Description

While running a SAP Plugin based application on Docker and PCF which uses the client connection type as Load Balanced the below mentioned error is thrown at the runtime.

-----Error Stack----
2018-01-15T19:08:16.65+0530 [APP/PROC/WEB/0] OUT 13:38:16.653 INFO  [Framework Event Dispatcher: Equinox Container: a0d0494f-f9f9-0017-1440-ba35bf3c629e] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300021: All Application dependencies are resolved for Application [<ApplicationName>:version]
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT 13:38:18.265 ERROR [<ApplicationName>.SAPConnectionResource] c.t.b.s.s.r.c.SAPClientConnection - TIBCO-BW-SR-SAPCONNECTION-501001: Connection Error. Unable to create a connection with the target application <SAPServerHostName/IP> using connection parameters client=<SAPClientID>, username=<SAPUserName>, language=E and the target application error is Initialization of destination <ApplicationName>..SAPConnectionResource.ClientConnection322d8eae failed: Connect to message server on host <SAPServerHostName/IP> failed
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT Connection parameters: TYPE=B DEST=<ApplicationName>.SAPConnectionResource.ClientConnection322d8eae MSHOST=<SAPMessageServerHostName/IP> R3NAME=<SAPServerSystemName> GROUP=<SAPLogonGroupName> PCS=1
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT LOCATION    CPIC (TCP/IP) on local host f27184b0-86b9-4849-72c3-6513 with
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT             Unicode
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT ERROR       service 'sapms<SAPServerSystemName>' unknown
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT TIME        Mon Jan 15 13:38:18 2018
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT RELEASE     721
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT COMPONENT   NI (network interface)
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT VERSION     40
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT RC          -3
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT MODULE      niuxi.c
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT LINE        1814
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT DETAIL      NiPGetServByName: 'sapms<SAPServerSystemName>' not found
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT SYSTEM CALL getaddrinfo
2018-01-15T19:08:18.26+0530 [APP/PROC/WEB/0] OUT COUNTER     1

2018-01-15T19:08:19.66+0530 [APP/PROC/WEB/0] OUT 13:38:19.663 ERROR [Framework Event Dispatcher: Equinox Container: a0d0494f-f9f9-0017-1440-ba35bf3c629e] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-600026: Failed to start BW Application [<ApplicationName>:version]. Reason: TIBCO-BW-FRWK-600053: Failed to initialize BW Component [ComponentConfirm].
-----Error Stack----


In general the above error is thrown if the entry for the SAP message service is missing from the Operating system's services file. The SAP Message Service is always required when you use a client connection and the connection type is using Logon Groups(i.e In case of Load Balanced Client connection) and this TCP/IP services with name sapmsSID needs to be defined in the Operating System's services file where SID represents the message service ID.

But when working with PCF or Docker there is no control on knowing which servers the application will be deployed to and which services file needs to be modified. This will make the SAP Plugin based application deployed on Docker or PCF to throw the above mentioned error during the runtime causing the application to stop.
 
 

Issue/Introduction

How to resolve error(service sapms unknown) occured on PCF and Docker environment while using Load Balanced Client Connection with SAP Plugin

Environment

All, PCF, Docker, BWCE

Resolution

In order to resolve this issue and make the application to run successfully on the PCF or Docker environment follow the below steps.

1. Open your application in studio.
2. Go to SAP connection resource > client connection configuration and then pass the value as '3600' for the parameter named "System Name" (if using Module properties then update the respective module property). Here 3600 is an example for the TCP/IP port where the SAP message service will be established. If you want to use a different port then please provide the same to the parameter "System Name".
3. Once the above step is done Create a new EAR and push it to PCF or Docker based on your requirement.

PS: The above solution is also applicable to other environments like Windows, Linux etc. To avoid having to maintain the services file, the TCP/IP port number such as 3600 can be specified as a value instead for parameter named "System Name" in the SAP Plugin load balanced client connection configuration.