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.
If you are using the Windows platform and the you
have the application server running as a Windows service, the stopServer command
will start the associated Windows service and it will be responsible
for starting the application server.
Although the stopServer command returns
control when the server completes shut down, it can return before
the i5/OS 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
QWAS61.
If security
is enabled, you must use a user name and password with the stopServer command
because the command invokes an MBean method on the server.
The username and password parameters
are not required with the stopServer command. The parameters
are automatically passed into the script that the Windows service
uses to shutdown the system.
stopServer <server> [options]where server is the name of the configuration directory of the server you want to stop.
This argument is required.
This argument 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.
The following options are available for the stopServer command:
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.
The following examples demonstrate correct syntax:
stopServer server1 stopServer server1 -nowait stopServer server1 -trace (produces the stopserver.log file)
stopServer server1 stopServer server1 -nowait stopServer server1 -trace (produces the stopserver.log file) stopServer -profileName mytest (stops server mytest configured for profile mytest)