Administering managed Liberty servers
You can start, stop, monitor, and troubleshoot managed Liberty servers by using the administrative console or the wsadmin tool.
Starting or stopping a managed Liberty server by using the console
To start or stop a managed Liberty server by using the console, complete the following steps.
- Click .
- Select the server that you want to manage.
- Click Start to start the server or Stop to stop the server.
Managing logs by using the console
Managed Liberty servers inherit logging mechanisms from WebSphere® Application Server.
You can configure the trace specification, maximum log file size, and other settings by using the console:
- Click .
- Select the managed Liberty server that you want to view the logs for.
- Configure the Diagnostic trace and Change log detail
levels settings.
For more information, see Log and trace settings and Diagnostic trace service in the Network Deployment 9.0.5 documentation.
In 9.0.5.24, the Diagnostic trace panel was replaced with the Log and trace configuration panel. For more information, see Log and trace configuration service settings.
Setting the Liberty installation for a node by using the console
Nodes that run managed Liberty servers can have multiple Liberty installations. A node configuration must use no more than one Liberty installation. You can set the configured Liberty installation by using the console.
- Click .
- Select the Liberty installation to use.
- Click Make configured.
All managed Liberty servers on the node use the Liberty installation that is configured for the node.
Adding a Liberty installation for a node by using the console
- Click
- Select Add on the panel.
- Enter the location of the liberty installation root in the displayed wizard. For example, enter /opt/liberty/wlp.
Starting or stopping a managed Liberty server by using scripting
You can start or stop a managed Liberty server by using the wsadmin scripting tool.
In the following examples, node_name is the name of the node
where the server is located and server_name is the name of the
server that you are starting or stopping.
-
To start a managed Liberty server, run the AdminControl.startServer command.
AdminControl.startServer('server_name', 'node_name') -
To stop a managed Liberty server, run the AdminControl.stopServer command.
AdminControl.stopServer('server_name', 'node_name')
Checking server status by using scripting
To check the status of a managed Liberty server, run the following command.
nodeagent = AdminControl.queryNames('type=NodeAgent,process=nodeagent,node=node_name,*')
AdminControl.invoke(nodeagent, 'getProcessStatus', 'server_name')
In this example, node_name is the name of the node where the
server is located and server_name is the name of the server that
you are checking the status of.
Setting the Liberty installation for a node by using scripting
You can set the configured Liberty installation by using the wsadmin scripting tool. To set the configured Liberty installation, use the AdminTask.setConfiguredManagedLibertyInstallation command.
In the following example, node_name is the name of the node that runs managed
Liberty servers and has multiple Liberty installations. The command sets the configured
Liberty installation for all servers on the node
to the /location/of/liberty
Liberty installation.
AdminTask.setConfiguredManagedLibertyInstallation('[-nodeName node_name -location /location/of/liberty]')
Adding a Liberty installation for a node by using scripting
node_name is the name of the node that you want to add the Liberty installation to and /opt/liberty/wlp is the Liberty installation root. AdminTask.addManagedLibertyInstallation('[-nodeName node_name -location /opt/liberty/wlp]')