The stopServer command reads the configuration file for the specified server process. This command sends a Java Management Extensions (JMX) command to the server telling it to shut down. By default, the stopServer command does not return control to the command line until the server completes the shut down process. There is a -nowait option to return immediately, as well as other options to control the behavior of the stopServer command. For more information about where to run this command, see the Using command tools article.
Note: Although the stopServer command returns control when the server completes shut down, it can return before the OS/400 process has terminated. Depending upon the amount of memory which the Java Virtual Machine must return to the memory pool, the process may take several seconds or minutes to completely end. You should not attempt to start the server again until the process has terminated. Use the WRKACTJOB SBS(subsystem) CL command to determine if the process has terminated completely. By default, subsystem is QWAS6.
Syntax
The command syntax is as follows:
stopServer [<server> [options]where server is the name of the configuration directory of the server you want to stop. This parameter is optional. If the default profile is being used, server defaults to server1. If the profile name is not default, then server defaults to the profile name.
Parameters
The following options are available for the stopServer command:
Note: If you are running in a secure environment but have not provided a user ID and password, you will receive the following error message:
ADMN0022E: Access denied for the stop operation on Server MBean due to insufficient or empty credentials.To solve this problem, provide the user ID and password information.
Usage scenario
The following examples demonstrate correct syntax:
stopServer server1 stopServer (stops server1 configured for the default profile) stopServer server1 -nowait stopServer server1 -trace (produces trace files under /QIBM/UserData/WebSphere/AppServer/V6/service/trace) stopServer -profileName mytest (stops server mytest configured for profile mytest)