server stop command
The server stop
command stops the named Open Liberty server.
This command triggers the server to enter a quiesce phase before stopping. The quiesce phase prevents new application requests from entering the server and allows existing requests time to complete. After that time, the server shuts down and the server process exits.
Usage examples
Stop the myserver
server with the quiesce stage:
server stop myserver
Force the myserver
server to stop without the quiesce stage:
server stop myserver --force
Syntax
Run the command from the path_to_liberty/wlp/bin
directory.
server stop serverName [options]
- serverName
-
The name of the server to run the command against. If no server is specified, the action is performed against the default server instance,
defaultServer
, if it exists. - options
-
One or more optional parameters.
Options
Option | Description |
---|---|
--force |
Skips the quiesce stage before the server is shut down.
|
Exit codes
The following exit codes are available for the server stop
command and the equivalent executable JAR file ws-server.jar
:
Code | Explanation |
---|---|
0 |
OK. 0 indicates successful completion of the requested operation. |
1 |
1 indicates invocation of a redundant operation, such as starting a started server or stopping a stopper server. 1 might also be returned if the JVM options that were used are not valid. |
2 |
2 indicates that the server does not exist. |
>=20 |
Exit codes that are greater than or equal to 20 indicate that an error occurred while performing the request. Messages are printed and captured in log files with more information about the error. |