Skip to Main Content
Return to Navigation

Administering a WebLogic Server Life Cycle

This section provides an overview of the WebLogic server life cycle and discusses how to:

Understanding the WebLogic Server Life Cycle

You control a WebLogic server’s life cycle primarily using a collection of scripts provided in that server’s WebLogic domain directory. Each instance of a WebLogic server runs in an isolated Java Runtime Environment (JRE), regardless of whether you're testing with a single-server configuration or implementing a multi-server configuration for production. All scripts must be launched from the WebLogic domain directory; and provide usage syntax if run with –help.

Starting and Stopping Single-Server Processes

In a single-server configuration, there's only one server to administer: PIA. You can control the life cycle of the PIA server using scripts or in the WebLogic console.

Scripts

For all platforms:

startPIA

Use this script to start the WebLogic server locally.

stopPIA

Use this script to connect to a locally running WebLogic server and issue a shutdown command through WebLogic APIs.

Note: When you shut down the server, a warning is displayed since the shutdown command uses a non-SSL http connection to connect to the WebLogic Server. This shutdown command can be changed to use the SSL connection by editing the stopPIA.sh script. To use the SSL connection the shutdown command will be the following.

For Windows only:

installNTservicePIA

Use this script to register the PIA WebLogic server as a Windows service that runs as a background process. the service is named as WebLogicDomainName-PIA, for example: peoplesoft-PIA.

uninstallNTservicePIA

Use this script to deregister the PIA Windows service.

WebLogic Console

A WebLogic server can also be shut down from the Administration Console. Sign in to the console at http://webserver:port/console and perform either of the following.

Note: Before you perform any action in the WebLogic console, you have to click the Lock and Edit button and then the Activate Changes button after the changes are done.

Image: Shutting down from the console

This example illustrates the fields and controls on the Shutting down from the console. You can find definitions for the fields and controls later on this page.

Shutting down from the console

In the navigation tree on the left, expand your domain, click Environment, Servers. Click PIA and select the Control tab. Select the check box for the server that you would like to shutdown, and click Shutdown. You have these options:

When work completes

This option enables transactions in progress to complete before shutting down the server. To terminate all HTTP sessions immediately, you can first select Ignore Sessions During Shutdown.

Force Shutdown Now

Immediately terminate all HTTP sessions and transactions in progress, and shut down the server.

Starting and Stopping Multi-Server Processes

In a Multi-server configuration, as the title implies there are multiple servers to administer. Controlling the life cycle of these servers can be done via scripts, the WebLogic console and the WebLogic Node Manager.

Scripts

For all platforms:

startWebLogicAdmin

Use this script to start the WebLogicAdmin server.

startManagedWebLogic

Use this script to start a WebLogic managed server. All of the servers defined in a multi-server domain, except the WebLogicAdmin server, are controlled as managed servers. For example, to start PIA1 as a managed server run startManagedWebLogic PIA1.

stopWebLogic

Use this script to connect to a locally running WebLogic server and issue a shutdown command using WebLogic APIs. A remote distributed managed server can be shut down using a local administration server.

For Windows only:

installNTservice.cmd

Use this script to register a WebLogic server as a Windows service that runs as a background process. The service is named as WebLogicDomainName-ServerName. For example, to define the PIA1 managed server as a Windows service, run installNTservice PIA1. To define the WebLogicAdmin server as a Windows service, simply run installNTservice.

UninstallNTservice.cmd

Use this script to deregister a WebLogic server that's defined as a Windows service.

Consider the following when using scripts with managed servers:

Operating System

Consideration

All

When starting a WebLogic managed server it will attempt to connect to its administration server. A managed server’s administration server is specified either as a command line parameter when starting the managed server, or using the three administration server environment variables in setEnv, specifically ADMINSERVER_PROTOCOL, ADMINSERVER_PORT, and ADMINSERVER_HOSTNAME. The first time a managed server starts, it must connect to its administration server. If on subsequent startups the administration server is not available, the managed server starts up in Managed Server Independence (MSI) mode by using its locally replicated msi-config.xml. A managed server running in MSI mode can't be administered from a console, so this situation should only be encountered when it is imperative that the managed server be started even though the administration server is not running. Once the administration server is back online, running managed servers that were not previously known by the administration server to be running may be rediscovered using WebLogic’s command line utilityjava weblogic.Admin DISCOVERMANAGEDSERVER, or you can just restart the managed server.

To use WebLogic’s java command line utility classes run setEnv to set up your environment, then run java weblogic.Admin for usage.

Windows

When running a WebLogic managed server as a Windows service, the managed server’s administration server must be running. When installing a managed server as a Windows service, the managed server service can be configured to be dependent on its local administration server. To configure a managed server service to be dependent on its local admin server service use the–depends option of installNTservice.cmd when defining the Windows service for the managed server. In addition, when the administration server is also a Windows service, you must define it using the following command:

installNTservice.cmd –delay interval

Where intervalis a period in milliseconds, for example6000. This allows the administration server sufficient time to start before the managed server starts.

WebLogic Server Console

A WebLogic server can also be shut down from its administration console in the same way as single server environments.

WebLogic Node Manager

The WebLogic Node Manager provides the ability to start a WebLogic managed server from the WebLogic Server Console. In addition, the console provides a way to automatically restart a failed server. As with all WebLogic servers, the WebLogic Node Manager runs isolated in its own JRE, and on Windows it can also run as a Windows service. The WebLogic Node Manager binds to a unique IP address and port at startup and accepts lifecycle commands from a WebLogic administration server.

Multiple WebLogic domains running on a singe machine can have its managed servers administered by a shared WebLogic Node Manager, as long as each WebLogic domain uses the same version of WebLogic.

The following table lists the WebLogic Node Manager files that are provided with WebLogic server, not the PIA install. These files are located in WLS_HOME\wlserver 10.3\server\bin\, not your WebLogic domain directory created within the PeopleSoft directory structure.

File

Description

startNodeManager.cmd

Use this script to start the WebLogic Node Manager as a foreground process.

installNodeMgrSvc.cmd

Use this script to define the WebLogic Node Manager as a Windows service that runs as a background process. The service is called WebLogic Platform NodeManager.

uninstallNodeMgrSvc.cmd

Use this script to uninstall the WebLogic Node Manager as a Windows service.

nodemanager.properties

This is the WebLogic Node Manager configuration file.

WLS_HOME\wlserver 10.3\common\nodemanager\NodeManagerLogs\ is the default logs directory for WebLogic Node Manager.

Additional configuration files are located in ...\common\nodemanager.

To configure Node Manager:

  1. Start the Admin Server.

  2. Signon to the Administration Console.

  3. Select Environment, Machine.

    Create one local machine (as in MachineLocal) for all of the managed servers running in the local server and one remote machine (as in MachineRemoteX) for each of the managed servers running in remote servers.

  4. Configure machines.

    Click each of the machines created. Under the Configuration tab, select the Node Manger tab.

    Choose Plain from the Type drop down list.

    For Listen Address, enter the IP address of the server on which Node Manager is running.

    Enter the Node Manger port number into the Listen Port text box. The default port number is 5556. This can be changed by updating the NodeManager.properties file.

  5. Add managed servers.

    Under the Servers tab, add the managed servers into the machine. For example, you may have two managed servers running locally, with PIA1 andRPS assigned toMachineLocal.

  6. Start the Node Manager.

    Start the Node Manger from your local WebLogic install directory (BEA Home for the WebLogic Sever on which your PeopleSoft domain is referring to). Node Manager can be started by startNodeManager.cmd/.sh script under BEA_Home\wlserver_10.3\server\bin directory.

    After the Node Manger has been started for the first time, a file called nodemanager.properties appears under the BEA_Home\wlserver_10.3\common\nodemanager directory.

  7. Modify the nodemanager.properties file.

    Stop the Node Manger and open the nodemanager.properties file in a text editor, and make the following changes and save the file.

    SecureListener=false

    ListenAddress= the IP of the box where the Node Manager is running

    Note: In the same file you can see the default port number is set as ListenPort=5556. Changing the port setting here and restarting the Node Manager will set the Node Manager to be listening on the newly configured port number. The port setting here must match with the one set in the machine configuration.

  8. Restart the Node Manager.

  9. Once the Node Manger is up and running, it should be reachable from the machine configured to listen to the local Node Manager (as in, MachineLcoal). This can be confirmed by the Node Manager Status tab under the Monitoring tab.

  10. In the remote box hosting the managed server, follow the previous steps to configure the Node Manager.

  11. From the bin directory under your PS_Domain, run setEnv.cmd/sh to set up the environment.

  12. Start WLST using the command java weblogic.WLST.

  13. Connect the remote server to the Admin Server running on the local box.

    Following is the syntax of the connect command:

    connect('username','password','t3://Local Machine's IP:port on which the admin
    server is running on Local machine')
    
  14. Enroll the remote domain and Node Manger into the Admin Server running on the local box.

    The command is nmEnroll with the following syntax:

    nmEnroll('full path to the distributed PeopleSoft Domain ','BEA_Home\wlserver_10.3\common\nodemanager')

    For example:

    nmEnroll('D:\PT850-809R2\webserv\Dis4103Installed603','D:\Wls103Installed603
    \wlserver_10.3\common\nodemanager') 
  15. Once the domain and Node Manager have been enrolled, check the Admin Console to confirm that the Node Manger can be reached from the server that was configured to listen to the remote Node Manager.

    Once a Node Manager is reached from a "machine," the Admin Console will be able to start and stop the managed server assigned to that "machine."

    The Servers tab shows the list of servers. The Control tab grants the control of those servers to the Admin Console.

Starting and Stopping a Distributed Managed Server

In a multi-server configuration, a distributed managed server is simply a managed server that isn't started from the same physical location as its domain’s administration server. You can control the life cycle of these servers using scripts, the WebLogic Server Console and the WebLogic Node Manager.

See Starting and Stopping Multi-Server Processes.