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 sapms
SID 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.