server debug command
The server debug
command starts the named Open Liberty server in debug mode.
This command runs the named server in the console foreground after a debugger connects to the debug port. The standard output and error from the server process are output to the foreground. The default port is 7777
. You can use the ${WLP_DEBUG_ADDRESS}
variable to specify an alternative port.
Usage examples
Start the myserver
server in debug mode:
server debug myserver
Start the myserver
server in debug mode and set the variable_name
variable to the variable_value
value:
server debug myserver -- --variable_name=variable_value
Syntax
Run the command from the path_to_liberty/wlp/bin
directory.
server debug serverName [options]
- serverName
The name of the server to run the command against. If no server is specified, a server called
defaultServer
is automatically created to run the command against.
Option
Option | Description |
---|---|
--variable_name=variable_value | Defines variables. Include |
Exit codes
The following exit codes are available for the server debug
command and the equivalent executable JAR file ws-server.jar
:
Code | Explanation |
---|---|
0 | This code indicates successful completion of the requested operation. |
1 | This code 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. |
>=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. |
Server process properties
The following JVM options are added:
-javaagent:wlp/bin/tools/ws-javaagent.jar
is required for server capabilities such as trace and monitoring.-Xshareclasses
and related options are on Eclipse Open J9 to enable the shared class cache.-XX:MaxPermSize
is set on HotSpot Java SE 7 to increase the size of the permanent generation space.-Djava.awt.headless=true
avoidsjava.awt.HeadlessException
on all platforms and focus-stealing problems on Mac OS X.
The server
command sets the umask
value to deny all permissions to Other
users before the command runs the action.
The current working directory of the server process is set to the server output directory.
The server command creates a process ID (PID) file when you start the server and deletes the PID file when you stop the server.