Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
csaba_goetz
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,472

I recently learned that SAP central service handling of TSA may work a bit differently than the classic way.

Affected instances

  • ASCS (ABAP SAP Central Services)
  • SCS (SAP Central Services - this on is required for Java)

Affected processes

  • message server, this appears in process list this way: ms.sap<SID>_<instance>
  • enqueue server, in process list en.sap<SID>_<instance>

How a classic SAP startup procedure looks like

  1. startsap command is called
  2. startsap starts sapstartsrv process (if not running)
  3. sapcontrol starts instance by Webmethods via sapstartsrv (Start, StartWait, etc.)
  4. sapstart starts the processes

There is a documentation which describes it in a little bit more detailed way: SAP Start Service - Architecture of the SAP NetWeaver Application Server - SAP Library

TSA does it on another way. In this case processes are started directly by *sapctrl*. This way sapstart process is not available in process list.

Okay, but why this is important for me?

sapstart writes sapstart.log in /usr/sap/<SID>/(A)SCS/work folder. This is then evaluated by sapcontrol Webmethod calls, among others by GetProcessList or GetSystemInstanceList ones. Whatever process ID (PID) is found in sapstart.log it will be used for determining the status of process. Even if the process is running, just because it has been started by TSA earlier, but the PID does not match the one is sapstart.log sapcontrol will give GRAY status - in some cases it could be RED as well. SAP Management Console uses the same methods for displaying process status.This could result in

  • wrong alerts
  • issues during software update or upgrade (via Software Update Manager a.k.a. SUM)
  • others

Example

Status:

> sapcontrol -nr 1 -function GetProcessList

28.10.2015 10:44:43

GetProcessList

OK

name, description, dispstatus, textstatus, starttime, elapsedtime, pid

msg_server, MessageServer, GRAY, Stopped, , , 1280

enserver, EnqueueServer, GRAY, Stopped, , , 1280

PIDs:

> ps -ef | grep ms.sap | grep -v grep

sidadm   12802 12787  0 Oct06 ?        00:02:07 ms.sapSID_ASCS01 pf=/usr/sap/SID/SYS/profile/SID_ASCS01_hostname


> ps -ef | grep en.sap | grep -v grep

sidadm   12803 12787  0 Oct06 ?        00:06:06 en.sapSID_ASCS01 pf=/usr/sap/NWC/SYS/profile/SID_ASCS01_hostname

How this should work in fact?

sap vendor cluster connector shuld be able to handle this. Check this document: Connecting startsapsrv and cluster frameworks using the components saphascriptco.so and sap_vendor_c...

What if I already have this issue?

There is a workaround available. This is a script wich writes the active process IDs of message server and enqueue server in sapstart.log. This way Webmethods will give the correct status back.

Where can I get the script?


It is attached to SAP Note http://service.sap.com/sap/support/notes/1492606 S-User login required.


Result


> sapcontrol -nr 1 -function GetProcessList

28.10.2015 10:56:09

GetProcessList

OK

name, description, dispstatus, textstatus, starttime, elapsedtime, pid

msg_server, MessageServer, GREEN, Running, 2015 10 06 07:29:11, 532:26:58, 12802

enserver, EnqueueServer, GREEN, Running, 2015 10 06 07:29:11, 532:26:58, 12803

1 Comment