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.

  1. Click Servers > Server Types > WebSphere application servers.
  2. Select the server that you want to manage.
  3. 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:

  1. Click Troubleshooting > Logs and trace.
  2. Select the managed Liberty server that you want to view the logs for.
  3. 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.

    [Network Deployment 9.0.5.24 or
later]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.

[Network Deployment 9.0.5.26 or
later][1.0.2.0 and later]

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.

  1. Click Nodes > node_name > Liberty installations.
  2. Select the Liberty installation to use.
  3. Click Make configured.

All managed Liberty servers on the node use the Liberty installation that is configured for the node.

[Network Deployment 9.0.5.28 or later][1.0.3.0 and later]

Adding a Liberty installation for a node by using the console

You can add a Liberty installation by using the console.
Note: The specified Liberty installation must be greater than the minimum ​​​​​​Liberty​​​​ version and must contain at least one Java installation.
  1. Click Nodes > node_name > Liberty installations
  2. Select Add on the panel.
  3. 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.

[1.0.1.0 and later][Network Deployment 9.0.5.26 or
later]

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]')
[Network Deployment 9.0.5.28 or later][1.0.3.0 and later]

Adding a Liberty installation for a node by using scripting

You can add a Liberty installation by using the wsadmin scripting tool.
Note: The specified Liberty installation must be greater than the minimum Liberty version and must contain at least one Java installation.
In the following example, 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]')