stopServer command


 

+

Search Tips   |   Advanced Search

 

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.

The server process can...

By default, stopServer 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.

If running WAS on a Microsoft Windows operating system, and we have the server running as a Windows operating system service, stopServer stops the Windows service that is responsible for starting the server.

If security is enabled, use a user name and password with stopServer because the command invokes an MBean method on the server.

For Windows the username and password parameters are not required with stopServer. The parameters are automatically passed into the script that the Windows operating system service uses to shutdown the system.

If message...

ADMC0074E: Connection will be closed due to unrecoverable error

...appears 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. We 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 admin client and the receiving server.

 

Syntax

The command syntax is one of the following:

stopServer <server_name> [options]

where server_name is the name of the configuration directory of the appserver or the DMZ Secure Proxy Server for IBM WAS that you want to stop.

This argument is required.

stopServer <adminagent_name>

where adminagent_name is the name of the administrative agent to stop.

stopServer <job_manager>

where job_manager is the name of job manager to stop.

 

Parameters

The following options are available for stopServer:

-nowait

Tells stopServer not to wait for successful shutdown of the server process.

-quiet

Suppresses the progress information that stopServer prints in normal mode.

-logfile <fileName>

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...

profile_root/logs/server

-timeout <seconds>

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 completely 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 RMI.

-port <portNumber>

Server JMX port to use explicitly, so that we can avoid reading the configuration files to obtain the information.

-username <name>

User name for authentication if security is enabled in the server. Acts the same as the -user option.

-user <name>

User name for authentication if security is enabled in the server. Acts the same as the -username option.

-password <password>

Password for authentication if security is enabled in the server.

If 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.

-help

Prints a usage statement.

-?

Prints a usage statement.

 

Usage scenario

The following examples demonstrate correct syntax:

stopServer server1
stopServer server1 -nowait
stopServer server1 -trace
stopServer adminagent
stopServer jobmgr
stopServer proxy1




 

Related tasks

Use command line tools