bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Administration Console Online Help

 Previous Next Contents Index  

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 lifecycle.

No matter which way you choose to start a server, the end result passes a set of configuration options to initialize a Java Virtual Machine (JVM). The server instance runs as a process within the JVM, and the JVM can host only one server process.

The following sections provide a comprehensive description of starting and stopping server instances:

For a quick overview of starting and stopping servers, refer to "Starting and Stopping WebLogic Server Instances: Quick Reference."

 


Version Requirements for Starting Servers

The Administration Server and all Managed Servers in a domain must be the same WebLogic Server version. The Administration Server must be either at the same service-pack level or at a later service-pack level than the Managed Servers. For example, if the Managed Servers are at release 8.1, then the Administration Server can be either release 8.1 or 8.1 SP1. However, if the Managed Servers are at SP1, then the Administration Server must be at SP1.

 


Starting Administration Servers

An Administration Server is a WebLogic Server instance that maintains configuration data for a domain. In a development environment, it is usually sufficient to start an Administration Server and deploy your applications directly onto the Administration Server. In a production environment, you create Managed Servers to run applications. For more information about Administration Servers and Managed Servers, refer to "Overview of WebLogic Server Domains."

To start an Administration Server, do the following:

  1. If you have not already done so, use the Domain Configuration Wizard to create a domain. For more information, refer to Creating Domains and Servers.
  2. Open a shell (command prompt) on the computer on which you created the domain.
  3. Change to the directory that you specified as the base directory for the domain. (See Figure 4-1.)
  4. Run one of the following scripts:

where domain_directory is the directory that you specified as the base domain directory.

Figure 4-1 Specifying the Base Domain Directory


 

To set environment variables, the script invokes WL_HOME\common\bin\commEnv.cmd (commEnv.sh on UNIX), where WL_HOME is the location in which you installed WebLogic Server.

After setting environment variables, the start script invokes the java weblogic.Server command, which starts a JVM and, within the JVM, a WebLogic Server instance.

When the server successfully completes its startup process, it writes the following message to standard out:

<Notice> <WebLogicServer> <000360> <Server started in RUNNING mode>

 


Alternate Ways to Start Administration Servers

The following sections describe alternate ways to start an Administration Server:

You cannot use the Node Manager to start an Administration Server.

Starting an Administration Server from the Windows Start Menu

When you create an Administration Server on a Windows computer, the Domain Configuration Wizard prompts you to install the server in the Windows Start Menu. If you choose yes, then you can do the following to start the server instance:

From the Windows desktop, click Start—>Programs—>BEA WebLogic Platform 8.1—>User Projects—>domain_name—>Start Server.

The Start Server command opens a command window and calls the startup script that is described in Starting Administration Servers. When the server has successfully completed its startup process, it writes the following message to standard out:

<Notice> <WebLogicServer> <000360> <Server started in RUNNING mode>

Starting an Administration Server When the Host Computer Boots

If you want an Administration Server to start automatically when you boot a computer, you can set up the server as a UNIX daemon or a Windows service. For information on starting a server as a Windows service, refer to "Setting Up a WebLogic Server Instance as a Windows Service."

Starting an Administration Server in the STANDBY State

You can start an Administration Server so that at the end of its startup cycle, the sever is in the STANDBY state. In this state, the server listens for requests only on the domain-wide administration port.

To configure an Administration Server so that it starts in the STANDBY state, do the following:

  1. Start the Administration Server.

    By default, it starts in the RUNNING state.

  2. Enable the domain-wide administration port. For more information, refer to Enabling the Domain-Wide Administration Port.
  3. In the left pane of the Administration Console, expand the Servers folder.
  4. Click on the name of the Administration Server.
  5. In the right pane, click the Configuration tab. Then click the General tab.
  6. From the Startup Mode list, select STANDBY.

    The Startup Mode list determines an Administration Server's default startup behavior. If you select STANDBY, all future startup cycles of this Administration Server will end in the STANDBY state.

  7. Click Apply.
  8. Restart the Administration Server.

When you are ready for this server to receive non-administrative requests, refer to Resuming a Server.

Starting an Administration Server With the java weblogic.Server Command

The weblogic.Server class is the main class for a WebLogic Server instance. You can start a server instance by directly invoking weblogic.Server in a Java command or by creating your own scripts that invoke the weblogic.Server class. (The scripts that WebLogic Server creates invoke weblogic.Server in a Java command.)

For information about invoking weblogic.Server in a Java command, refer to "weblogic.Server Command Line Reference."

 


Starting Managed Servers from the Administration Console

A Managed Server is a WebLogic Server instance that runs deployed applications. It refers to the Administration Server for all of its configuration and deployment information. Usually, you use Managed Servers to run applications in a production environment. For more information about Managed Servers and Administration Servers, refer to "Overview of WebLogic Server Domains."

To use the Administration Console to start a Managed Server, do the following:

  1. If you have not already done so, create a Managed Server. For more information, refer to Creating Domains and Servers.
  2. Configure the Managed Server to communicate with a Node Manager. For more information, refer to Configuring a Machine.

    The Node Manager is a standalone Java program provided with each WebLogic Server installation. In addition to starting and stopping Managed Servers, you can use the Node Manager to monitor and automatically restart Managed Servers based on server health. You cannot use the Node Manger to start Administration Servers. For more information on the Node Manger, refer to "Overview of Node Manager."

  3. Start the Node Manager on the computer that you want to host the Managed Server. For more information, refer to "Starting Node Manager."
  4. Start the Administration Server.
  5. In the Administration Console, expand the Servers node in the left pane. A list of servers appears under the Servers node.
  6. Select a specific server in the left pane. (See Figure 4-2.)

    Figure 4-2 Select a Server


     

  7. Select the Control tab.
  8. Do one of the following:

    Note: These commands override the Startup Mode setting on the Server—> Configuration—>General tab.

  9. Click Yes to confirm and start the server, or No to cancel the action.

    The Administration Console displays an animated status icon while the Node Manager starts the server on the target machine. (See Figure 4-3.)

    Figure 4-3 Status Icon


     

    When the Node Manager finishes its start sequence, the status icon is no longer displayed and the server's state is indicated in the Current Status table, under the State column. (See Figure 4-4.)

  10. To view messages that the Node Manager generated while starting the server, click the Task Completed link in the Current Status table.

    Figure 4-4 View the Node Manager Output


     

    These messages are also written to the Node Manager log file for that server, as described in "Managed Server Log Files."

 


Starting Managed Servers From a WebLogic Server Script

A Managed Server is a WebLogic Server instance that runs deployed applications. It refers to the Administration Server for all of its configuration and deployment information. Usually, you use Managed Servers to run applications in a production environment. For more information about Managed Servers and Administration Servers, refer to "Overview of WebLogic Server Domains."

WebLogic Server provides scripts that you can use to start Managed Servers, however, these scripts do not use the Node Manager to start and manage the server.

To use the WebLogic Server scripts to start a Managed Server, do the following:

  1. If you have not already done so, create a Managed Server. For more information, refer to Creating Domains and Servers.
  2. Start the domain's Administration Server.
  3. If you want to run the Managed Server on a remote WebLogic Server host, do the following:
    1. Establish a session with a remote computer on which you have installed WebLogic Server. For example, you can use telnet or VNC to establish a connection with a remote WebLogic Server host.
    2. Create a directory or change to the directory that you want to use as the server's root directory. For more information, refer to "A Server's Root Directory."
    3. Copy the following script to the remote computer:
      domain_directory\startManagedWebLogic.cmd (Windows)
      domain_directory/startManagedWebLogic.sh (UNIX)
    4. where domain_directory is the directory that you specified as the base directory for the domain. (See Figure 4-1.)

    5. In a text editor on the remote computer, open the startManagedWebLogic script.
    6. Edit the command that calls the WebLogic Server environment script (WL_HOME\common\bin\commEnv.cmd or commEnv.sh) so that the pathname matches the pathname on the remote computer.
    7. For example, if you installed WebLogic Server on the D drive of the remote computer, make sure the call command specifies the D drive:
      @rem set up common environment
      call "D:\bea\weblogic\common\bin\commEnv.cmd"

    8. Save the modified startManagedWebLogic script.
  4. In a shell (command prompt) on the computer that you want to host the Managed Server, enter one of the following commands:

    where managed_server_name specifies the name of the Managed Server and admin_url specifies the listen address (host name or IP address) and port number of the domain's Administration Server.

For example, the following command uses startManagedWebLogic.cmd to start a Managed Server named myManagedServer. The listen address for the domain's Administration Server is AdminHost://7001:

c:\user_domains\mydomain\startManagedWebLogic.cmd myManagedServer http://AdminHost://7001 

For more information on configuring a connection to the Administration Server, refer to Configuring a Connection to the Administration Server.

To set environment variables, the script invokes WL_HOME\common\bin\commEnv.cmd (commEnv.sh on UNIX), where WL_HOME is the location in which you installed WebLogic Server.

After setting environment variables, the start script invokes the java weblogic.Server command, which starts a JVM and, within the JVM, a WebLogic Server instance.

When the server has successfully completes its startup process, it writes the following message to standard out:

<Notice> <WebLogicServer> <000360> <Server started in RUNNING mode>

 


Alternate Ways to Start Managed Servers

The following sections describe alternate ways to start a Managed Server:

Starting All Managed Servers in a Domain

The Administration Console provides an operation that starts all Managed Servers that have been configured to communicate with a Node Manager.

To start all Managed Servers in a domain., do the following:

  1. Configure the Managed Servers to communicate with a Node Manager. For more information, refer to Configuring a Machine.

    The Node Manager is a standalone Java program provided with each WebLogic Server installation. In addition to starting and stopping Managed Servers, you can use the Node Manager to monitor and automatically restart Managed Servers based on server health. You cannot use the Node Manger to start Administration Servers. For more information on the Node Manger, refer to "Overview of Node Manager."

  2. Start the Node Manager on all computers that host Managed Servers. For more information, refer to "Starting Node Manager."
  3. Start the Administration Server.
  4. In the left pane of the Administration Console, click on the name of the domain. (See Figure 4-5.)

    Figure 4-5 Click on the Name of the Domain


     

  5. In the right pane, click the Control tab.
  6. Do one of the following:

    Note: These commands override the Startup Mode setting on the Server—> Configuration—>General tab.

  7. When the Administration Console prompts you to confirm the command, click Yes.

    The Administration Console displays an animated status icon while the Node Manager starts each server on its target machine. (See Figure 4-3.)

    Figure 4-6 Status Icon


     

    When the Node Manager finishes the start sequence for all servers, the status icon is no longer displayed and the state of each server is indicated in the Current Status table, under the State column.

  8. To view messages that the Node Manager generated while starting the servers, click the Task Completed link in the Current Status table.

    These messages are also written to the Node Manager log file for that server, as described in "Managed Server Log Files."

Starting a Managed Server in the STANDBY State

You can start a server instance so that at the end of its startup cycle, the sever is in the STANDBY state. In this state, the server listens for requests only on the domain-wide administration port.

Note: The instructions in this section apply only if you use a WebLogic Server start script (or invoke the java weblogic.Server command). If you want to use the Node Manager to start a Managed Server in the STANDBY state, refer to Starting Managed Servers from the Administration Console or the documentation for the weblogic.Admin STARTINSTANDBY command.

To start a Managed Server in the STANDBY state, do the following:

  1. Start the domain's Administration Server.
  2. Enable the domain-wide administration port. For more information, refer to Enabling the Domain-Wide Administration Port.
  3. In the left pane of the Administration Console, expand the Servers folder.
  4. Click on the name of a server. (See Figure 4-2.)
  5. In the right pane, click the Configuration tab. Then click the General tab.
  6. From the Startup Mode list, select STANDBY.

    The Startup Mode list determines the default startup behavior for a server that you start with a WebLogic Server script. If you select STANDBY, all future startup cycles for this server that you initiate with a WebLogic Server script will end in the STANDBY state.

  7. Click Apply.
  8. Use a WebLogic Server script (or invoke the java weblogic.Server command).

When you are ready for this server to receive non-administrative requests, refer to Resuming a Server.

Creating Scripts That Use the Node Manager

You can create your own scripts that use the Node Manager to start Managed Servers. The scripts must incorporate the weblogic.Admin START or weblogic.Admin STARTINSTANDBY commands. For more information on weblogic.Admin commands, refer to the "weblogic.Admin Command-Line Reference."

Starting a Managed Server When the Host Computer Boots

If you want a Managed Server to start automatically when you boot a computer, you can set up the server as a UNIX daemon or a Windows service. For information on starting a server as a Windows service, refer to "Setting Up a WebLogic Server Instance as a Windows Service."

Starting a Managed Server With the java weblogic.Server Command

The weblogic.Server class is the main class for a WebLogic Server instance. You can start a server instance by directly invoking weblogic.Server in a Java command or by creating your own scripts that invoke the weblogic.Server class. (The scripts that WebLogic Server creates invoke weblogic.Server in a Java command.)

For information about invoking weblogic.Server in a Java command, refer to "weblogic.Server Command Line Reference."

Starting a Managed Server if the Administration Server is Unavailable

Usually, a Managed Server contacts the Administration Server during its startup sequence to retrieve its configuration information. For information on starting Managed Servers when the Administration Server is unavailable, refer to "Starting a Managed Server When the Administration Server Is Not Available."

Note: The first time you start a Managed Server, it must be able to contact the Administration Server. Thereafter you can configure Managed Servers to start even if the Administration Server is unavailable.

 


Providing Usernames and Passwords to Start a Server

To start a WebLogic Server instance, you must provide the credentials of a user who is permitted to start servers. For information on user credentials, roles, and permissions, refer to "Protecting System Administration Operations."

This section describes the following tasks:

Specifying an Initial Administrative Username for a Domain

When you create a domain, the Configuration Wizard prompts you to provide a username and password. This user becomes the initial administrative user the myrealm security realm. A security realm is a collection of components (providers) that authenticate usernames, determine the type of resources that the user can access, and provide other security-related services for WebLogic resources. WebLogic Server installs the myrealm security realm and uses it by default.

The first time you start a WebLogic Server, enter this initial administrative username and password.

You can use the Administration Console to add users to myrealm. If you use an Authentication provider other than the one that WebLogic Server installs, you must use the provider's administration tools to create at least one user with administrative privileges. For information on granting administrative privileges, refer to "Protecting System Administration Operations."

You can configure a WebLogic Server to use a different security realm. If you set up different security realms, you must designate one of those realms as the default. During its startup cycle, a WebLogic Server uses the default realm to authenticate the username that you supply.

Bypassing the Prompt for Username and Password

By default, WebLogic Server prompts you for user credentials when you start an Administration Server. It also prompts for credentials when you start a Managed Server by invoking the java weblogic.Server command (either directly on the command line or through a script that invokes the command).

Note: WebLogic Server does not prompt you for user credentials if you use the Node Manager to start a Managed Server; you must provide these credentials when you configure Remote Startup properties in the Administration Console. For more information, refer to Specifying User Credentials When Starting a Server with the Node Manager.

If you want to bypass the prompt for username and password, we recommend that you create and use a boot identify file, which contains your username and password in an encrypted format.

This section contains the following subsections:

Creating a Boot Identity File

To create a boot identity file, place the following two lines in a text file:

username=username
password=password

The username and password values must match an existing user account in the Authentication provider for the default security realm and must belong to a role that has permission to start a server. For information on roles and permissions, refer to "Protecting System Administration Operations."

If you save the file as boot.properties and locate it in the server's root directory, the server will automatically use this file during startup. For information about specifying a server's root directory, refer to the -Dweblogic.RootDirectory argument in "Location of License and Configuration Data."

If you save the file under a different name or in a different location, you must use an additional command-line argument. For more information, refer to the next section, Using a Boot Identity File.

The first time you use this file to start a sever, the server reads the file and then overwrites it with an encrypted version of the username and password.

Using a Boot Identity File

For a given server instance, use only the boot identity file that the instance has created. For example, if you use ServerA to generate a boot identity file, use only that boot identity file with ServerA. WebLogic Server does not support multiple server instance sharing a single boot identity file.

If a server's root directory contains a valid boot.properties, it uses this file by default.

If you want to specify a different file (or if you do not want to store boot identity files in a server's root directory), you can include the following argument in the server's weblogic.Server startup command:

-Dweblogic.system.BootIdentityFile=filename

where filename is the fully qualified pathname of a valid boot identity file.

To specify this argument in the startWebLogic script, add -Dweblogic.system.BootIdentityFile as a value of the JAVA_OPTIONS variable. For example:
JAVA_OPTIONS=-Dweblogic.system.BootIdentityFile=C:\BEA\user_domains\mydomain\myidentity.prop

If a server is unable to access its boot identity file, it displays the username and password prompt in its command shell and writes a message to the log file.

Boot Identity Files and Managed Server Independence

Managed Server Independence (MSI) enables Managed Servers to start even if the Administration Server is not available. If you want to use a boot identity file for a Managed Server that starts in MSI mode, you must copy it and other files to the root directory of the Managed Server. For more information, refer to "Starting a Managed Server When the Administration Server Is Not Accessible."

Removing a Boot Identity File After Startup

If you want to remove the boot identity file after a server starts, you can include the following argument in the server's weblogic.Server startup command:

-Dweblogic.system.RemoveBootIdentity=true

This argument removes only the file that the server used to start. For example, if you specify -Dweblogic.system.BootIdentityFile=c:\secure\boot.MyServer, only boot.MyServer is removed, even if the server's root directory contains a file named boot.properties.

To specify this argument in the startWebLogic script, add -Dweblogic.system.RemoveBootIdentity=true as a value of the JAVA_OPTIONS variable. For example:
JAVA_OPTIONS=-Dweblogic.system.RemoveBootIdentity=true

Alternate Method: Passing Identity Information on the Command Line

Using a boot identity file is the most secure and convenient way to bypass the interactive prompt. However, instead of using a boot identify file, you can add the following arguments to the weblogic.Server startup command:

-Dweblogic.management.username=username
-Dweblogic.management.password=password

If you supply both of these arguments, you can bypass the interactive prompt.

Because the command to start a server can be long, typically you place most of the startup command in a script. Unless you are in an environment in which security is not a concern, we recommend that you do not save the -Dweblogic.management.password=password argument in a startup script.

For more information about these arguments, refer to Starting in Development Mode or Production Mode.

Specifying User Credentials When Starting a Server with the Node Manager

If you use the Node Manager to start a Managed Server, you must provide user credentials on the Remote Start tab of the Administration Console. If you do not provide these credentials, the Node Manager throws an exception when it tries to start the server.

If you use the Administration Console to create a Managed Server, the Administration Console adds your WebLogic Server credentials to the server's Remote Start tab. The Administration Console encrypts the password before writing it to the config.xml file.

If you use the Domain Configuration Wizard to create Managed Servers, you must start the Administration Console and provide user credentials.

To specify or modify user credentials when starting a server with the Node Manager, do the following:

  1. In the left pane of the Administration Console, expand the Servers folder.
  2. Click the server you want to configure.
  3. In the right pane, click the Configuration tab. Then click the Remote Start tab.
  4. In the Username field, enter the name of an existing user.

    The user must be in a role that has permission to start servers. For information on roles and permissions, refer to "Protecting System Administration Operations."

  5. Click Apply.
  6. Under Password, click the Change link.
  7. On the Change Password page, enter the password and its confirmation. Then click Apply.

 


Other Startup Tasks

The following sections describe miscellaneous startup tasks:

Running a Startup Script Outside the Server's Root Directory

All instances of WebLogic Server use a root directory to store runtime data and to provide the context for any relative pathnames in the server's configuration. An Administration Server requires the domain's config.xml file to be located in its root directory. For more information about a server's root directory, refer to "A Server's Root Directory."

If you use a WebLogic Server script to start a server instance, by default the server assumes that the directory from which you run the script is the server's root directory.

If you want to locate and run your startup script outside of a server's root directory, edit the WebLogic Server script so that the JAVA_OPTIONS variable specifies the following:

-Dweblogic.RootDirectory=path

where path specifies the location of the root directory.

For example, if you use c:\bea\user_projects\mydomain\startManagedWebLogic.cmd to start a Managed Server, but you want the server's root directory to be d:\ManagedServerRoot, edit c:\bea\user_projects\mydomain\startManagedWebLogic.cmd to make the JAVA_OPTIONS variable specify the following:

JAVA_OPTIONS=-Dweblogic.RootDirectory=d:\ManagedServerRoot

Configuring a Connection to the Administration Server

If you start a Managed Server from a script that invokes the java weblogic.Server command, or if you invoke the java weblogic.Server command directly, you must make sure that the Managed Server specifies the correct listen address of the Administration Server. A Managed Server uses this address to retrieve its configuration from the Administration Server.

Use the following format to specify the listen address:

[protocol://]Admin-host:port

For protocol, you can specify any of the following:

If you do not specify a value, the servers use T3.

Note: Regardless of which protocol you use, the initial download of a Managed Server's configuration is over HTTP or HTTPS. After the RMI subsystem initializes, the server instance can use the T3 or T3S protocol.

For Admin-host, you can use any of the following by default:

If the Administration Server has been configured to use some other listen address, you must specify the configured listen address. For more information, refer to Setting the Listen Address.

For port, specify any of the following:

To verify the host IP address, name, and default listen port of the Administration Server, start the Administration Server in a shell (command prompt). When the server successfully finishes its startup cycle, it prints to standard out messages that are similar to the following (among other messages):

<Apr 19, 2002 9:24:19 AM EDT> <Notice> <WebLogicServer> <000355> <Thread "Listen Thread.Default" listening on port 7001, ip address 11.12.13.141> 
...
<Apr 19, 2002 9:24:19 AM EDT> <Notice> <WebLogicServer> <000331> <Started WebLogic Admin Server "MedRecServer" for domain "MedRec" running in Development Mode>

For information on enabling SSL, refer to "Configuring the SSL Protocol." For more information on Administration Ports, refer to Enabling the Domain-Wide Administration Port.

Starting in Development Mode or Production Mode

You can run WebLogic Server in two different modes: development and production. The setting applies to all servers in a domain: either all servers run in development mode or all servers run in production mode.

Development mode enables WebLogic Server instances to automatically deploy and update applications that are in the domain_name/applications directory (where domain_name is the name of a WebLogic Server domain).

Production mode disables the auto-deployment feature. Instead, you must use the WebLogic Server Administration Console or the weblogic.Deployer tool. For more information on deployment, refer to "Deployment and Packaging."

In addition, the default values for some WebLogic Server attributes differ depending on the mode.

By default, WebLogic Server instances run in development mode. To make all servers in a domain start in production mode, do the following:

  1. In the left pane of the Administration Console, click on the name of the domain. (See Figure 4-5.)
  2. In the right pane, click the Configuration tab. Then click the General tab.
  3. Click in the Production Mode check box to place a checkmark there.
  4. Click Apply.
  5. Restart any servers that are currently running.

Resuming a Server

If you have started a server in the STANDBY state, when you are ready for the server to receive requests other than administration requests, do the following:

  1. In the left pane of the Administration Console, expand the Servers folder.
  2. Select a server that is in the STANDBY state.
  3. In the right pane, click the Control tab. Then click the Start/Stop tab.
  4. Select Resume this server. Then, click Yes to confirm and resume the server.

For information on how the server transitions from STANDBY to the RUNNING state, refer to "RESUMING."

Changing the JVM That Runs a WebLogic Server Instance

When you install WebLogic Server, the scripts that set up the WebLogic Server environment and that start server instances are all configured to use the JVM that the WebLogic installation program installed. The following sections describe how to use a JVM that was not installed with WebLogic Server:

Changing the JVM for a WebLogic Server Startup Script

If you use a WebLogic Server script to start servers, or if your own startup scripts refer to WL_HOME\common\bin\commEnv.cmd (commEnv.sh on UNIX), do the following:

  1. Create a backup copy of WL_HOME\common\bin\commEnv.cmd (commEnv.sh on UNIX).
  2. Open commEnv.cmd (commEnv.sh on UNIX) in a text editor.
  3. Edit the set JAVA_HOME command to specify the home directory of your JVM. For example, set JAVA_HOME=C:\JRockit\JRE\1.3.1
  4. Edit the set JAVA_VENDOR command so that it specifies one of the supported values.

    The supported values are listed in the line immediately preceding the set JAVA_VENDOR command.

  5. Save the commEnv file.
  6. Restart all servers.

All of the startup scripts that refer to the commEnv file will use the JVM that you specified.

Changing the JVM for the Node Manager and Servers

To change the JVM that the Node Manager uses and the default JVM for each Managed Server that the Node Manager starts, do the following:

  1. In a text editor, open WL_HOME\server\bin\startNodeManager.cmd (startNodeManager.sh on UNIX).
  2. Edit the set JAVA_HOME command to specify the home directory of your JVM. For example, set JAVA_HOME=C:\JRockit\JRE\1.3.1
  3. Save the startNodeManager file.
  4. Restart the Node Manager on all WebLogic Server host computers.
  5. Restart all Managed Servers.

If you want a specific Managed Server to use a JVM that is different from the one that the Node Manager is using, do the following:

  1. In left pane of the Administration Console, click the server.
  2. In the right pane, click the Configuration tab. Then click the Remote Start tab.
  3. In the Java Home field, specify the home directory of the JVM.
  4. Click Apply.
  5. Restart the Managed Server.

Specifying Java Options for a WebLogic Server Instance

You use Java options to configure operating parameters for the JVM that runs a WebLogic Server instance. For example, you use Java options to tune the performance and monitoring capabilities of the JRockit JVM.

You can also use Java options to temporarily override a server's configuration. The Java options apply only to the current instance of the server. They are not saved in the domain's config.xml file and they are not visible from the Administration Console. For example, if a server is configured to listen on port 7201, you can use a Java option to start the server so that it listens on port 7555. The Administration Console will still indicate that the server is configured to listen on port 7201. If you do not use the Java option the next time you start the server, it will listen on port 7201.

The following sections describe how to specify Java options for the JVM that runs a WebLogic Server instance:

Specifying Java Options for a WebLogic Server Startup Script

If you use a WebLogic Server script to start servers, do the following:

  1. Create a backup copy of the WebLogic Server start scripts:

    where domain_directory is the directory that you specified as the base directory for the domain. (See Figure 4-1.)

  2. Open the start scripts in a text editor.
  3. Edit the set JAVA_OPTIONS command to specify the Java options. If you specify multiple options, separate each option by a space, and place quotes around the entire set of options. For example:
    set JAVA_OPTIONS="-Xgc:gencopy -Xns:30"

    For information on the Java options that the JRockit Virtual Machine supports, refer to "JRockit Java Virtual Machine User Guide." For information on the Java options that other JVMs support, refer to the documentation that the JVM vendor provides.

    For information on the Java options that set runtime behavior of a WebLogic Server instance, refer to "weblogic.Server Command-Line Reference."

  4. Save the start script.
  5. Restart the server.

Specifying Java Options for a Managed Server that the Node Manager Starts

If you use the Node Manager to start Managed Servers, do the following for each server:

  1. In left pane of the Administration Console, click the server.
  2. In the right pane, click the Configuration tab. Then click the Remote Start tab.
  3. In the Arguments field, specify the Java options. If you specify multiple options, separate each option by a space.

    For information on the Java options that the JRockit Virtual Machine supports, refer to "JRockit Java Virtual Machine User Guide." For information on the Java options that other JVMs support, refer to the documentation that the JVM vendor provides.

    For information on the Java options that set runtime behavior of a WebLogic Server instance, refer to "weblogic.Server Command-Line Reference."

  4. Click Apply.
  5. Restart the Managed Server.

Addressing Out of Memory Errors

When starting WebLogic Server, JDK 1.3 may throw an OutOfMemory error if you are trying to load a large number of classes. This error occurs even though there appears to be plenty of memory available. If you encounter a java.lang.OutOfMemory error exception when you start WebLogic Server, increase the value of the following JVM option:

java -XX:MaxPermSize=<value>

where <value> is some number in kilobytes.

For JDK1.3.1, the default value for MaxPermSize is 64m, where m stands for megabytes.

 


Shutting Down Instances of WebLogic Server

You can do any of the following to shut down a WebLogic Server instance:

Shutting Down a Server

To shut down a server from the Administration Console, do the following.

  1. In the left pane, expand the Servers folder.
  2. Click a server. (See Figure 4-2.)
  3. In the right pane, click the Control tab. Then click the Start/Stop tab.
  4. To initiate a graceful shutdown, click Shutdown this server.

    A graceful shutdown gives WebLogic Server subsystems time to complete certain application processing currently in progress. For information, refer to Controlling Graceful Shutdowns and "Graceful Shutdown."

  5. To initiate a forced shutdown, click Force shutdown this server.

    When you initiate a forced shutdown, the server instructs subsystems to immediately drop in-work requests. For more information, refer to Setting the Timeout Period for Forced Shutdown Operations and "Forced Shutdown."

  6. Click Yes to confirm and shut down the server.

If you shut down the Administration Server, the Administration Console is no longer active.

Shutting Down All Servers in a Domain

To shut down all Managed Servers and the Administration Server, do the following:

  1. In the left pane of the Administration Console, click the name of the domain. (See Figure 4-5.)
  2. In the right pane, click the Control tab.
  3. To initiate a graceful shutdown of all servers, click Shutdown this server.

    When you initiate a forced shutdown, each server notifies its subsystems to complete all in-work requests. A graceful shutdown gives WebLogic Server subsystems time to complete certain application processing currently in progress. For information, refer to Controlling Graceful Shutdowns and "Graceful Shutdown."

  4. To initiate a forced shutdown, click Force shutdown of all servers.

    When you initiate a forced shutdown, the server instructs subsystems to immediately drop in-work requests. For more information, refer to Setting the Timeout Period for Forced Shutdown Operations and "Forced Shutdown."

  5. When the Administration Console prompts you to confirm the command, click Yes.
  6. To confirm that the domain is killed, review the output in the shell process that runs the Administration Server. It displays an ALERT message that indicates the shutdown sequence has been initiated, and then it exits the process.

Controlling Graceful Shutdowns

A graceful shutdown gives WebLogic Server subsystems time to complete certain application processing currently in progress. To control the length of the graceful shutdown process, do the following:

  1. In the left pane of the Administration Console, expand the Servers folder.
  2. Click the name of a server. (See Figure 4-2.)
  3. In the right pane, click the Control tab. Then click the Start/Stop tab.
  4. If you want the server's graceful shutdown to drop all HTTP sessions immediately instead of waiting for them to complete or timeout, place a checkmark in the Ignore Sessions During Shutdown box.

    Waiting for abandoned HTTP sessions to timeout can significantly lengthen the graceful shutdown process because the default session timeout is 24 hours.

  5. Graceful Shutdown Timeout—Specifies a time limit for a server instance to complete a graceful shutdown. If you supply a timeout value, and the server instance does not complete a graceful shutdown within that period, WebLogic Server will perform a forced shutdown on the server instance.
  6. To limit the amount of time the server takes to complete a graceful shutdown, enter the maximum number of seconds in the Graceful Shutdown Timeout box.

    If you supply a timeout value, and the server instance does not complete a graceful shutdown within that period, WebLogic Server will perform a forced shutdown on the server instance.

    If you do not supply a timeout value, the server will wait indefinitely to complete a graceful shutdown.

Setting the Timeout Period for Forced Shutdown Operations

  1. Expand the Servers node in the left pane. A list of servers appears under the Servers node.
  2. Select a specific server in the left pane. (See Figure 4-2.)
  3. Select the Configuration—>Tuning tab.
  4. In the Timeout for Server Lifecycle Operations box, enter the number of seconds a lifecycle operation waits before timing out.
  5. Click Apply to save your changes.

For more information about LifeCycle operations, refer to "Server Lifecycle."

Killing the JVM

Each WebLogic Server instance runs in its own JVM. If you are unable to shut down a server instance using the methods described in the previous sections, you can use an operating system command to kill the JVM.

Caution: If you kill the JVM, the server immediately stops all processing. Any session data is lost. If you kill the JVM for an Administration Server while the server is writing to the config.xml file, you can corrupt the config.xml file.

Some common ways to kill the JVM are as follows:

 

Back to Top Previous Next