The ‘sapcontrol’ command doesn’t work at the OS level.

Symtoms

Tried to run a command like ‘sapcontrol -nr 00 -function GetProcessList’ at the OS level, but it returns the following errors:

  • FAIL: NIECONN_REFUSED (Connection refused)
  • NiRawConnect failed in plugin_fopen()

Solution

  1. Check the ‘sapstartsrv’ process is in running status.
    • Use the following command: ps -ef|grep sapstartsrv.
    • There might be dead sapstartsrv processes.
      • D00: If you’re unable to run sapcontrol with instance number 00, the D00 process might have terminated.
      • ASCS01: If you’re unable to run sapcontrol with instance number 01, the ASCS01 process might have terminated.
  2. To restart the sapstartsrv process, run the command ‘sapcontrol -nr <xx> -function StartService <SID>’.

References

3028932 – sapcontrol returns NIECONN_REFUSED for a remote instance

SAP Start Service

By Z_NERD

Tech Stack #SAP Basis (2023~), SAP HANA, Oracle, Linux, AIX, basic ABAP

Leave a Reply

Your email address will not be published. Required fields are marked *