The stopServer command reads the configuration file for the specified server process. This command sends a 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. You can run this command from the $WAS_HOME/bin directory of a WAS installation or a Network Deployment installation.
The command syntax is as followswhere server is the name of the configuration directory of the server you want to stop. This argument is required.stopServer <server> [options]
The following options are available for the stopServer command...
-nowait Tells the stopServer command not to wait for successful shutdown of the server process.
-quiet Suppresses the progress information that the stopServer command prints in normal mode.
-logfile <fileName> Specifies the location of the log file to which information is written.
-replacelog Replaces the log file instead of appending to the current log.
-trace Generates trace information into a file for debugging purposes.
-timeout <seconds> Specifies the time to wait for server shutdown before timing out and returning an error.
-statusport <portNumber> Supports an administrator in setting the port number for server status callback.
-conntype <type> Specifies the JMX connector type to use for connecting to the deployment manager. Valid types are Simple Object Access Protocol (SOAP), or RMI.
-port <portNumber> Specifies the server JMX port to use explicitly, so that you can avoid reading the configuration files to obtain the information.
-username <name> Specifies the user name for authentication if security is enabled in the server. Acts the same as the -user option.
-user <name> Specifies the user name for authentication if security is enabled in the server. Acts the same as the -username option.
-password <password> Specifies the password for authentication if security is enabled in the server.
If you are running in a secure environment but have not provided a user ID and password, you will receive the following error messageTo solve this problem, provide the user ID and password information.ADMN0022E: Access denied for the stop operation on Server MBean due to insufficient or empty credentials.
-help Prints a usage statement.
-? Prints a usage statement.
The following examples demonstrate correct syntaxstopServer server stopServer server -nowait stopServer server -trace (produces the stopserver.log file)