Starting and stopping servers in the Liberty profile

Use the Liberty server command to start and stop WebSphere® eXtreme Scale servers in the Liberty profile.

Before you begin

The Liberty is the Java virtual machine (JVM) process that starts in OSGi and provides a flexible framework for serving applications. The eXtreme Scale server is the mechanism that provides grid services. The main two services are the catalog service and the container service. A Liberty is started from the command line with the server start server_name or server run server_name commands. When the Liberty starts, it reads the server.xml file to determine what Liberty features to start. WebSphere eXtreme Scale has three features: server, client, and web. If you add the server feature to the feature manager, then the Liberty starts the eXtreme Scale server bundles. However, adding the server feature does not necessarily start any eXtreme Scale servers.

The eXtreme Scale servers start only when a valid service is configured. For example, if you want to configure a catalog service, then the isCatalog="true" attribute must be set on the xsServer ... element in the server.xml file.

The following options are available to configure a container service:
  • Copy a valid objectgrid.xml file (with or without an accompanying objectGridDeployment.xml file) into the wlp_home/usr/servers/server_name/grids directory. This grids directory is a monitored directory, and changes to files in this directory initiate events in the Liberty runtime environment. For example, when new objectgrid.xml, objectGridDeployment.xml, or both files are found, eXtreme Scale creates and starts a new container. When one of these files are deleted, eXtreme Scale stops that container. When files are modified, eXtreme Scale stops and restarts the container. Multiple containers can exist in the same eXtreme Scale server, which requires that subdirectories exist inside the grids directory.
  • Install an OSGi bundle. This bundle must reference a blueprint.xml file that contains server metadata. This method of starting a server is similar to how you can start servers OSGi environments without the Liberty in WebSphere eXtreme Scale Version 7.1.1. In Version 8.5, the server element is no longer required in the blueprint.xml file. Therefore, you must define the server metadata in the server.xml file. Additionally, bundles are simple to install and start by dropping them into the grids directory in a similar way that you drop XML files in the grids directory.
  • Use the embedded server API. This option is similar to the process for starting the server in a stand-alone environment. With the Liberty, however, you must ensure that you run your code to start the eXtreme Scale server.

About this task

Use this task to start eXtreme Scale servers with the Liberty server command. The wlp/bin directory contains a script called server to help control the server process. The following syntax for this command is supported:
server <task> [server] [options]

Procedure

  • Start eXtreme Scale servers.
    When you run the start command, the server is launched as a background process. Use the following example to start the server:
    bin/server start server_name
    [Windows]bin/server.bat start server_name
  • Stop eXtreme Scale servers; for example:
    When you run the stop command, the running server is stopped. Use the following example to stop the server:
    bin/server stop server_name
    [Windows]bin/server.bat stop server_name