Managing the Server Life Cycle

During its lifetime, a server can transition through a number of operational states, such as shutdown, starting, standby, admin, resuming, and running. WLST commands such as start, suspend, resume, and shutdown cause specific changes to the state of a server instance.

Starting and Stopping Servers

WebLogic Server provides several ways to start and stop server instances. The method that you choose depends on whether you prefer using a graphical or command-line interface, and on whether you are using the Node Manager to manage a server’s life cycle.

For an overview of methods for starting and stopping server instances, see “Starting and Stopping Servers” in Managing Server Startup and Shutdown.

This command starts the Administration Server without using Node Manager. However, if you use Node Manager to start the Administration Server, Node Manager supports starting, stopping, and restarting it if it fails. See Using WLST and Node Manager to Manage Servers.

After WLST starts a server instance, the server runs in a separate process from WLST; exiting WLST does not shut down the server.

Invoke and connect WLST to a running WebLogic Administration Server instance using the connect command.

c:\>java weblogic.WLSTwls:/(offline)> connect('username','password')Connecting to weblogic server instance running at t3://localhost:7001 as username weblogic ...Successfully connected to Admin Server 'myserver' that belongs to domain 'mydomain'.Warning: An insecure protocol was used to connect to the server.To ensure on-the-wire security, the SSL port or Admin port should be used instead.

wls:/mydomain/serverConfig>

For detailed information about connect command arguments, see connect.

For each Managed Server in the Administration Server’s domain that you want to start, repeat step 4.

The start command starts Managed Servers or clusters in a domain using Node Manager. To use the start command, WLST must be connected to a running Administration Server. To start Managed Servers without requiring a running Administration Server, use the nmStart command with WLST connected to Node Manager. See Using WLST and Node Manager to Manage Servers.

To start clusters,

wls:/mydomain/serverConfig> start('mycluster', 'Cluster')Starting the following servers in Cluster, mycluster: MS1, MS2, MS3.........................................................................All servers in the cluster mycluster are started successfully.wls:/mydomain/serverConfig>

Using WLST and Node Manager to Manage Servers

Node Manager is a utility for the remote control of WebLogic Server instances that lets you monitor, start, and stop server instances—both Administration Servers and Managed Servers—and automatically restart them after a failure. For more information about Node Manager, see “Using Node Manager to Control Servers” in Managing Server Startup and Shutdown.

You can start, stop, and restart server instances remotely or locally, using WLST as a Node Manager client. In addition, WLST can obtain server status and retrieve the contents of the server output log.

You connect WLST to a running Node Manager instance in order to invoke Node Manager supported commands. Node Manager commands issued via WLST are processed by the Node Manager on the system hosting the target server instances. After being authenticated by Node Manager, you need not re-authenticate each time you enter a Node Manager command.

In addition, you can enroll the machine on which WLST is running to be monitored by Node Manager by entering the nmEnroll command. You must run this command once per domain per machine unless that domain shares the root directory of the Administration Server. WLST must be connected to an Administration Server to run this command; WLST does not need to be connected to the Node Manager. See nmEnroll.

Communications from WLST to the Node Manager process on a machine include:

Life cycle commands

Commands to determine the availability of the Node Manager process and the health state of the server instances under Node Manager control

Requests for log files

The following example uses WLST Node Manager commands to start, monitor, and stop an Administration Server.

Monitoring Server State

WebLogic Server displays and stores information about the current operational state of a server instance and state transitions that have occurred since the server instance started up. This information is useful to administrators who:

Monitor the availability of server instances and the applications they host.