The stopServer script
The stopServer script stops the specified server. If the server is enabled to use the embedded JMS server support, any associated WebSphere MQ jobs are also ended.
Product
This script is available in WebSphere Application Server and WebSphere Application Server Network Deployment.
Authority
To run this script, your user profile must have *ALLOBJ authority. For information on setting explicit authorities for a user profile that does not have *ALLOBJ authority, see Set explicit authorities for the startServer and stopServer scripts.
Syntax
The syntax of the stopServer script is:
stopServer [ server ] [ -instance instance ] [ -nowait ] [ -quiet ] [ -logfile filename ] [ -replacelog ] [ -trace ] [ -timeout seconds ] [ -statusport statusportnumber ] [ -port portnumber ] [ -username username ] [ -password password ] [ -conntype SOAP | RMI ] [ -help | -? ]Parameters
The parameters of the stopServer script are:
server
Optional. The value server specifies the name of the server that you want to stop.
- If server is not specified and the -instance parameter is either not specified or has a value of default, the default value of server is:
- WebSphere Application Server: server1
- WebSphere Application Server Network Deployment: dmgr
- If server is not specified and you specify a non-default instance for the -instance parameter, the default value of server is the value specified for the -instance parameter.
This value is case sensitive.
-instance
Optional. The value instance specifies the name of the instance that contains the server that you want to stop. The default value is default.-nowait
Optional. If you specify this parameter, the script returns control to the user without waiting for the server to stop successfully. The default is to wait for the server to stop successfully.-quiet
Optional. If you specify this parameter, the script does not display informational messages. The default is to display informational messages while the script runs.-logfile
Optional. The value filename specifies the location and name of the log file for the script. The default value is /QIBM/UserData/WebAS5/edition/instance/logs/server/stopServer.log where edition is Base or ND depending on which product you are running, instance is the name of the instance that contains the server that you want to stop, and server is the name of the server that you want to stop.-replacelog
Optional. If you specify this parameter, the script replaces the log file if it exists. By default the script appends to the log file if it exists.-trace
Optional. If you specify this parameter, the script outputs additional trace information to the log file for the script. You should only specify this parameter if errors occur when you try to stop a server. The default is to not log additional trace information.-timeout
Optional. The value seconds specifies the amount of time in seconds to wait for the server to stop before returning control to the caller. The default is to wait until the server has stopped successfully.-statusport
Optional. The value statusportnumber specifies the port on which to listen for the status of the server while it is stopping. The default is to use the next available port.-port
Optional. The value portnumber specifies the SOAP or RMI port for the server. If you specify this parameter, the stopServer script sends the stop command directly to server. If you specify the RMI port value for this parameter, specify the -conntype parameter. By default, the script reads the configuration files to obtain the information that is necessary to stop the server.-conntype
Optional. If you specify the -port parameter, the -conntype parameter specifies the connector type to use. Valid values are SOAP or RMI. The default value is SOAP.-username
This parameter is required if security is enabled for the server. The value username specifies the user name for authentication.-password
This parameter is required if security is enabled for the server. The value password specifies the password for authentication.Note: If you are running in a secure environment but do not provide a user ID and password, this error message is displayed:
ADMN0022E: Access denied for the stop operation on Server MBean due to insufficient or empty credentials.Run the command again with the -username and -password parameters.
-help or -?
This optional paramter prints the usage statement for the script.
Examples
These examples demonstrate correct syntax:
stopServer server1Stops server server1 for the default instance.
stopServer server1 -nowaitThis example stops the server1 application server for the default instance and returns control immediately to the user.
stopServer myserver -instance myinst -port 10380 -conntype SOAPThis example uses the SOAP port (10380) to stop the myserver application server in the myinst instance.