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.
The server process can be
an application server, a DMZ Secure Proxy Server for IBM® WebSphere® Application Server, an
administrative agent server, or a job manager server
By default, the stopServer command does not return control to the
command line until the server completes the shutdown process. There
is a -nowait option to return immediately, and other options to control
the behavior of the stopServer command. For more information about
where to run this command, see the Using command-line tools topic.
Although the stopServer command returns control
when the server completes shut down, it can return before the IBM i process has terminated. Depending
upon the amount of memory which the Java virtual machine
(JVM) 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, the subsystem is QWAS8.
Avoid trouble: If message
ADMC0074E: Connection will be closed
due to unrecoverable error is displayed in the system log
file, a client might have attempted to send a user name, and password
to another server on which security is disabled. You can ignore this
message because the client automatically changes its security setting
to match the security setting for the server with which the client
is trying to communicate. The connection is eventually successfully completed.
However, security is now disabled for both the administrative client
and the receiving server.
gotcha
Syntax
The command syntax is one of the
following:
stopServer <server_name> [options]
whereserver_name is
the name of the configuration directory of the application server
or the DMZ Secure Proxy Server for IBM WebSphere Application Server that
you want to stop.
This argument is optional. If the default profile
is being used, the server defaults to server1. If the profile name
is not default, the server defaults to the profile name.
stopServer <adminagent_name>
whereadminagent_name is
the name of the administrative agent that you want to stop.
where job_manager is
the name of job manager that you want to stop.
Parameters
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 trace information
is written. By default, the log file is named stopServer.log and is
created in the logs directory.
- -profileName
- Defines the profile of the server process in a multi-profile installation.
The -profileName option is not required for running in a single profile
environment. The default for this option is the default profile.
- -replacelog
- Replaces the log file instead of appending to the current log.
- -trace
- Generates trace information into a file for debugging purposes.
The trace output is written to the stopServer.log file which is located
in the profile_root/logs/server directory.
- -timeout <seconds>
- Specifies the time to wait for server shutdown before timing out
and returning an error.
- -statusport <portNumber>
- An optional parameter that allows an administrator to set the
port number for server status callback. The tool opens this port
and waits for status callback from the server just before the server
has stopped. If the parameter is not set, an unused port is automatically
allocated.
- -conntype <type>
- Specifies the JMX connector type to use for connecting to the
deployment manager. Valid types are SOAP or Remote Method Invocation
(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.
Avoid trouble: If you are running
in a secure environment but have not provided a user ID and password,
you 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.
gotcha
- -help
- Prints a usage statement.
- -?
- Prints a usage statement.
Usage scenario
The following examples demonstrate
correct syntax:
stopServer server1 (stops the server1 server for the default profile)
stopServer server1 -nowait
stopServer server1 -trace (produces the stopserver.log file)
stopServer -profileName mytest (stops server mytest
configured for profile mytest)
stopServer AdminAgent01
stopServer JobMgr01
stopServer proxy1 (default server name for the SecureProxySrv01 profile)