Skip to end of metadata
Go to start of metadata
 

Symptom

The instance start/stop is controlled by the upgrade.

Start/stop the instance manually only, if it is really requested, unwanted start/stop can impact the whole update.

Possible situations, when the instance needs to be started/stopped manually:

  • An error occured in one of the START* STOP* phases and you want to check if a manual start stop is working
  • During an update phase  instance parameter(s) needs to be changed and activated with an instance restart for optimizing runtime or avoid an error
     

    Some instance parameter can be activated dinamically without instance restart, check the parameter documentation in the transaction RZ11

    Shadow instance: There is a simplier method to start/stop the shadow instance, but the method using sapcontrol described here can be also used.

Solution


Precheck

 

If you don't know, which instance number from which kernel directory needs to be stopped,started,

 check the following commands at the end of the  SAPup.ECO logfile in the  <update directory>/abap/log directory:

Start command of the sapstartsrv service:

EXECUTING <kernel directory>/sapstartsrv pf=<profile dir>/<profile name> -D

Example: EXECUTING /usr/sap/PRD/DVEBMGS39/exe/sapstartsrv pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS39_saphost -D

Start command of the central instance:

EXECUTING <kernel directory>/sapcontrol.exe -host <host> -nr <instnr> -queryuser -function StartWait 300 10

Example: EXECUTING E:\usr\sap\PRD\DVEBMGS02\exe\sapcontrol.exe -host SAPHOST -nr 26 -queryuser -function StartWait 300 10

After the kernel directory and the instance number was identified follow the steps described bellow

To start the instance manually, proceed as follows:

 

UNIX/LINUX

1.Make sure, that the sapstartsrv service is up and running. 

  • Check the running instances with the command:

    > <kernel directory>/sapcontrol -nr <instnr> -function GetSystemInstanceList

  • If you get an error e.g.

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

    the sapstartsrv seems not to be running.

  • Execute the command as sidadm:
    >ps -ef| grep sapstartsrv
     The following command line for the process needs to be displayed:

    /usr/sap/<SID>/<instance>/exe/sapstartsrv pf=<profile> -D

  • If you cannot find the running sapstartsrv process, execute the above command manually and check again the running processes

  • Restart the sapstartsrv service if it is running to reload the newest environment and profile settings:

    >sapcontrol -nr <instance number> -function RestartService

  •  Check again, if the sapstartsrv is running

2.Start the instance

  • Execute the command identified in the Precheck part without hostname. The command should be executed on the host where the instance should be running:
    > <kernel directory>/sapcontrol.exe  -nr <instnr> -function Start
  • Check the running instances with the command:
    > <kernel directory>/sapcontrol -nr <instnr> -function GetSystemInstanceList                                   

WINDOWS

1.Make sure, that the sap service SAP_<SID>_<instnr> is up and running. 

  • Check the running instances with the command:

> <kernel directory>\sapcontrol -nr <instnr> -function GetSystemInstanceList

  • If you get an error e.g.

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

  • Check the service state in the Control Panel - Services  overview. If it is stopped, start it. 
  • If the service is missing (was maybe deinstalled), please follow the

SAP note 2004710 - How to re-install  a SAP Service on Windows platforms

 

  • Restart the sapstartsrv service if it is running to reload the newest environment and profile settings:

> <kernel directory>\sapcontrol -nr <instance number> -function RestartService

  •  Check again, if the SAP service is running

2.Start the instance

  • Execute the command identified in the Precheck part without hostname. The command should be executed on the host where the instance should be running:
    <kernel directory>\sapcontrol.exe  -nr <instnr> -function Start
  • Check the running instances with the command:
    > <kernel directory>\sapcontrol -nr <instnr> -function GetSystemInstanceList
  • You can also use the SAPMMC to check the instance status.

Troubleshooting start errors


If the instance status is GRAY, troubleshooting steps can be found on the wiki pages

Different memory related errors 
Handling network port related errors
Error handling when an  incorrect kernel is used
sapcontrol error:  FAIL Invalid Credentials    or   HTTP1.1 401 Unauthorized   
SAP Startup Troubleshooting Guide for Netweaver Application Server      
                                    

To stop the instance manually, proceed as follows:

 

UNIX/LINUX

1.Make sure, that the sapstartsrv service is up and running. 

  • Check the running instances with the command:

    > <kernel directory>/sapcontrol -nr <instnr> -function GetSystemInstanceList

  • If you get an error e.g.

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

    the sapstartsrv seems not to be running.

  • Execute the command as sidadm: >ps -ef| grep sapstartsrv  The following command line for the process needs to be displayed:

    /usr/sap/<SID>/<instance>/exe/sapstartsrv pf=<profile> -D

  • If you cannot find the running sapstartsrv process, execute the above command manually and check again the running processes

  • Restart the sapstartsrv service if it is running to reload the newest environment and profile settings:

    >sapcontrol -nr <instance number> -function RestartService

  •  Check again, if the sapstartsrv is running

2.Stop the instance

  • Execute the command identified in the Precheck part without hostname. The command should be executed on the host where the instance should be running:

  • > <kernel directory>/sapcontrol.exe  -nr <instnr> -function Stop

  • If you get an error, please check the page sapcontrol error: FAIL Invalid Credentials or HTTP1.1 401 Unauthorized

  • Check the running instances with the command: > <kernel directory>/sapcontrol -nr <instnr> -function GetSystemInstanceList

  • The instance status should be gray

3.Stop the sapstartsrv process if needed

If the kernel needs to be replaced or the shared memory needs to be cleaned the sapstartsrv process needs to be stopped also.

Execute the command:

 > <kernel directory>/sapcontrol  -nr <instnr> -function StopService

or kill the running sapstartsrv process.

WINDOWS

1.Make sure, that the sap service SAP_<SID>_<instnr> is up and running. 

    • Check the running instances with the command:

      > <kernel directory>\sapcontrol -nr <instnr> -function GetSystemInstanceList

    • If you get an error e.g.

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

       

    • Check the service state in the Control Panel - Services  overview.

      If it is stopped, start it. 

    • If the service is missing (was maybe deinstalled), please follow the

      SAP note 2004710 - How to re-install  a SAP Service on Windows platforms

 

  • Restart the sapstartsrv service if it is running to reload the newest environment and profile settings:

    > <kernel directory>\sapcontrol -nr <instance number> -function RestartService

  •  Check again, if the SAP service is running

2.Stop the instance

  • Execute the command identified in the Precheck part without hostname.
    The command should be executed on the host where the instance should be running:
    <kernel directory>\sapcontrol.exe  -nr <instnr> -function Stop
  • Check the running instances with the command:  
    > <kernel directory>\sapcontrol -nr <instnr> -function GetSystemInstanceList
  • You can also use the SAPMMC to check the instance status.
  • The instance status should be gray

3.Stop the sap service if needed

If the kernel needs to be replaced or the shared memory needs to be cleaned the sap service   needs to be stopped also.

  • Execute the command:

> <kernel directory>/sapcontrol  -nr <instnr> -function StopService

  • If you get an error, please check the page

sapcontrol error: FAIL Invalid Credentials or HTTP1.1 401 Unauthorized

  • You can also stop the sap service  in the Control Panel - Services  overview.

Related SAP notes/KBAs

 2004710 - How to re-install  a SAP Service on Windows platforms

 

 

 

 

  • No labels