Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Command Reference

## SHUTDOWN

Gracefully shuts down the specified WebLogic Server instance.

A graceful shutdown gives WebLogic Server subsystems time to complete certain application processing currently in progress. By default, a server instance waits for pending HTTP sessions to finish as a part of the graceful shutdown. You can override this behavior using the `-ignoreExistingSessions` argument. See "Graceful Shutdown" in the Configuring and Managing WebLogic Server guide.

In release 6.x, this command included an option to specify a number of seconds to wait before starting the shutdown process. This option is now deprecated. To support this deprecated option, this command assumes that a numerical value in the field immediately after the `SHUTDOWN` command indicates seconds. Thus, you cannot use this command to gracefully shut down a server whose name is made up entirely of numbers. Instead, you must use the Administration Console. For information, refer to "Shutting Down a Server" in the Administration Console Online Help.

Instead of specifying a delay in the `SHUTDOWN` command, you can now use a `-timeout` option, or set attributes in the Administration Console to control how a server shuts down. For more information, refer to "Controlling Graceful Shutdowns" in the Administration Console Online Help.

If a server instance is in a deadlocked state, it can respond to `weblogic.Admin` commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option for shutting down the server instance is to kill the Java process that is running the server. You will lose all session data. For information on enabling the domain-wide administration port, refer to "Enabling the Domain-Wide Administration Port" in the Administration Console Online Help.

### Syntax

>     java [ SSL Arguments ]
>          [-Dweblogic.system.BootIdentityFile=filename
>            [-Dweblogic.RootDirectory=path]
>          ]
>          weblogic.Admin
>          [ Connection Arguments ]
>          [ User Credentials Arguments ]
>        SHUTDOWN [-ignoreExistingSessions] [-timeout seconds]
>        [targetServer]

>     (Deprecated)java [ SSL Arguments ]
>          [-Dweblogic.system.BootIdentityFile=filename
>            [-Dweblogic.RootDirectory=path]
>          ]
>          weblogic.Admin
>          [ Connection Arguments ]
>          [ User Credentials Arguments ]
>        SHUTDOWN [seconds ["stringMessage"]] [targetServer]

Argument | Definition
--- | ---
`-Dweblogic.system.BootIdentityFile=``filename` `[-Dweblogic.RootDirectory=``path``]` | Cause the command to retrieve encrypted user credentials from a boot identity file. See "Boot Identity Files" in the Administration Console Online Help. Use these arguments if you invoke this command from a script, you have not created a user configuration file, and you do not want to store user credentials in your script. If you do you not use the `-username` argument or a user configuration file to specify credentials (see User Credentials Arguments), the command retrieves user credentials from a boot properteis file as follows: If you invoke the command from a server's root directory, and if the server's root directory contains a valid `boot.properties` file, it retrieves credentials from this file by default. For information about a server's root directory, refer to "A Server's Root Directory." If you invoke the command from a server's root directory, but the server's boot identity file is not in the server's root directory or is not named `boot.properties`, the command can use a boot identity file if you include the following argument: `-Dweblogic.system.BootIdentityFile=`filename where filename is the fully qualified pathname of a valid boot identity file. If you do not invoke the command from a server's root directory, the command can use a boot identity file if you include both of the following arguments in the command: `-Dweblogic.system.BootIdentityFile=`filename `-Dweblogic.RootDirectory=`path where filename is the fully qualified pathname of a valid boot identity file and `path` is the relative or fully-qualified name of the server's root directory. If you have not created a boot identity file for a server, or if you do not want to use it, you must use the `-username` and `-password` arguments to provide user credentials. If you specify both `-Dweblogic.system.BootIdentityFile=`filename and `-username` and `-password`, the command uses the credentials specified in the `-username` and `-password` arguments.
`-ignoreExistingSessions` | Causes a graceful shutdown operation to drop all HTTP sessions immediately. If you do not specify this option, the command refers to the Ignore Sessions During Shutdown setting for the server in the domain's `config.xml` file. For more information, refer to "Controlling Graceful Shutdowns" in the Administration Console Online Help. By default, a graceful shutdown operation waits for HTTP sessions to complete or timeout.
`-timeout` `seconds` | The number of seconds subsystems have to complete in-flight work and suspend themselves. If you specify a timeout value and the subsystems do not complete work and suspend themselves within that period, WebLogic Server will perform a forced shutdown on the server instance. If you do not specify a value, the `SHUTDOWN` command defers to the Graceful Shutdown Timeout setting that is specified on the Server—>Control—>Start/Stop tab of the Administration Console. By default, this setting is `0`, which means that the server will wait indefinitely for graceful shutdown to complete.
`targetServer` | The name of the server to shut down. If you do not specify a value, the command shuts down the server that you specified in the `-url` argument.
`seconds` | (Deprecated) Number of seconds allowed to elapse between the invoking of this command and the shutdown of the server.
`"``stringMessage``"` | (Deprecated) Message, in double quotes, to be supplied in the message that is sent if a user tries to log in while the WebLogic Server is being shut down.

### Example

The following example instructs the Administration Server to shut down a Managed Server:

>     java weblogic.Admin -url AdminHost:7001 -username weblogic
>     -password weblogic SHUTDOWN MedRecManagedServer

After you issue the command, MedRecManagedServer prints messages to its log file and to its standard out. The messages indicate that the server state is changing and that the shutdown sequence is starting.

If the command succeeds, the final message that the target server prints is as follows:

>     <Oct 12, 2002 11:28:59 AM EDT> <Alert> <WebLogicServer> <000219> <The
>     shutdown sequence has been initiated.>

In addition, if the command succeeds, the `weblogic.Admin` utility returns the following:

`Server "MedRecManagedServer" was shutdown successfully ...`

For more information about the environment in which this example runs, refer to Example Environment.

In the following example, the Administration Server is not available. The same user connects to a Managed Server and instructs it to shut itself down:

>     java weblogic.Admin -url ManagedHost:8001 -username weblogic
>     -password weblogic SHUTDOWN

The following example provides user credentials by referring to a boot identity file. The example specifies the server's root directory and boot identity file name so that it can be invoked from any directory:

>     java -Dweblogic.system.BootIdentityFile=c:\mydomain\boot.properties
>      -Dweblogic.RootDirectory=c:\mydomain weblogic.Admin
>      -url AdminHost:7001 SHUTDOWN