Administering a WebLogic Server Life Cycle

This section provides an overview of the WebLogic server life cycle and discusses how to work with server processes.

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.

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, using PSADMIN, or in the WebLogic console.

Scripts

For all platforms:

Field or Control

Description

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.

For Microsoft Windows only:

Field or Control

Description

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 Remote Console

A WebLogic server can also be shut down from the WebLogic Remote Console. See Using WebLogic Remote Console.

Click the Monitoring Tree tile, and then select Environment > Servers. Select PIA to enable these controls:

  • Start

  • Resume

  • Suspend

  • Shutdown

  • Restart SSL

This example illustrates a portion of the Monitoring, Servers, PIA page . Several columns in the grid are not shown.

WebLogic Remote Console Server page for PIA

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 by using scripts, the WebLogic console and the WebLogic Node Manager.

Scripts

For all platforms:

Field or Control

Description

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:

Field or Control

Description

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 utility java 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 interval is a period in milliseconds, for example, 6000. This allows the administration server sufficient time to start before the managed server starts.

WebLogic Remote Console

A WebLogic server can also be shut down from its administration Remote 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 Remote 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 their 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\server\bin\, not your WebLogic domain directory created within PS_CFG_HOME. The default location for WLS_HOME that is installed by the DPK setup script is BASE_DIR\pt\bea\.

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\common\nodemanager\NodeManagerLogs\ is the default logs directory for WebLogic Node Manager.

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

Note: The log and configuration files are created when Node Manager is installed.

See Oracle WebLogic Remote Console Online Help, Configure Machines.

To configure Node Manager:

  1. Sign in to the WebLogic Remote Console.

  2. Click the Edit Tree tile, then select Environment > Machines.

  3. Click New.

  4. Enter a name for the new 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.

    (Optional) If you are creating a machine that will run on a UNIX platform, select UNIX Machine from the Type drop-down list.

  5. Click Create.

  6. Configure the settings of your new machine under Environment, then Machines, then MachineLocal.

  7. Select the Node Manager tab, and specify the attributes required to connect to the Node Manager process:

    • Type — Select the Node Manager type for the clients to use when connecting to the NodeManager Instance.

      Select Plain, SSH, RSH, or SSL.

      (Optional) If you set type to SSH or RSH, you should also specify values in the NodeManager home and shell command fields.

    • Listen Address — Enter the host name or IP address of the server for the server or clients on the server to use when connecting to the Node Manager.

    • Listen Port — Enter the port number for the server or clients on the server to use when connecting to the Node Manager.

      The default port number is 5556.

  8. Add server instances to the machine.

    For example, you may have two managed servers running locally, with PIA1 and RPS assigned to MachineLocal.

    Note: You cannot change the machine of a server that's running, therefore you cannot use WebLogic Remote Console to change the machine of the Administration Server. Use an offline tool, such as WLST Offline instead.

    1. Shut down the Managed Server.

      You cannot change the machine of a running server.

    2. Under Edit Tree, select Environment > Servers.

    3. Select the Managed Server that you want to assign to a machine.

    4. On the General tab, from the Machine drop-down list, select the machine to which you want to assign this server.

    5. Click Save.

  9. Start the Node Manager.

    Start the Node Manger from your local WebLogic install directory (WLS_HOME for the WebLogic Server which your PeopleSoft domain is referring to). Node Manager can be started with the startNodeManager.cmd (for Windows) or startNodeManager.sh (for UNIX) script under WLS_HOME\wlserver\server\bin directory.

    After the Node Manager has been started for the first time, a file called nodemanager.properties appears under the WLS_HOME\wlserver\common\nodemanager directory.

  10. Modify the nodemanager.properties file.

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

    SecureListener=false

    ListenAddress= the IP of the computer 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 configure the Node Manager to listen on the newly configured port number. The port setting here must match with the one set in the machine configuration.

  11. Restart the Node Manager.

  12. Once the Node Manager is up and running, it should be reachable from the machine configured to listen to the local Node Manager (as in, MachineLocal). This can be confirmed on the Node Manager Status tab under the Monitoring tab.
  13. In the remote computer hosting the managed server, follow the previous steps to configure the Node Manager.

  14. From the bin directory under your PS_Domain (<PS_CFG_HOME>/psft/pt/8.59/webserv/<web_server_domain>/bin), run setEnv.cmd (for Windows) or setEnv.sh (for UNIX) to set up the environment.

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

  16. Connect the remote server to the Admin Server running on the local computer.

    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')
    
  17. Enroll the remote domain and Node Manager into the Admin Server running on the local computer.

    The command is nmEnroll with the following syntax:

    nmEnroll('full path to the distributed PeopleSoft Domain ','WLS_HOME\wlserver\common\nodemanager')

    For example:

    nmEnroll('D:\PT862\webserv\Dis4103Installed603','D:\WlsInstall\wlserver\common\nodemanager') 
  18. Once the domain and Node Manager have been enrolled, check the Remote Console to confirm that the Node Manager 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 Remote Console will be able to start and stop the managed server assigned to that "machine."

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

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 Remote Console and the WebLogic Node Manager.

See Starting and Stopping Multi-Server Processes.