BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   BEA WebLogic Server Administration Guide:   Previous topic   |   Next topic   |   Contents   |  Index

 

Configuring WebLogic Servers and Clusters

 

This section discusses the following topics:

Overview of Server and Cluster Configuration

The persistent configuration for a domain of WebLogic Servers and clusters is stored in an XML configuration file. You can modify this file in three ways:

Role of the Administration Server

IWhichever method you choose, the Administration Server must be running when you modify your domain configuration.

The Administration Server is the WebLogic Server on which the Administration Service runs. The Administration Service provides the functionality for WebLogic Server, and manages the configuration for an entire domain.

By default an instance of WebLogic Server is treated as an Administration Server. When the Administration Server starts, it loads the configuration files, which are stored, by default, in a directory called config under the WEBLOGIC_HOME directory. The config directory has a sub-directory for each domain that is available to the Administration Server. The actual configuration file resides inside the domain-specific directory and is calledconfig.xml. By default, when an Administration Server starts, it looks for configuration file (config.xml) under the default domain directory, which is named -mydomain.

Each time the Administration Server is successfully started, a back up configuration file named config.xml.booted is created in the domain specific directory.In the unlikely event that the config.xml file should become corrupted during the lifetime of the server, it is possible to revert to this previously known, good configuration.

A domain may consist of only one WebLogic Server, which operates as the Administration Server.

A typical production environment contains an Administration Server and multiple WebLogic Servers. When you start the servers in such a domain, the Administration Server is started first. As each additional server is started, it is instructed to contact the Administration Server for its configuration information. In this way, the Administration Server operates as the central control entity for the configuration of the entire domain. No more than one Administration Server can be active in a domain. Only the Administration Server can modify the configuration files when it is running.

configa.jpg

Figure 3-1 WebLogic Server Configuration

Starting the Administration Console

The main point of access to the Administration Server is through the Administration Console. To open the Administration Console, complete the following procedure:

http://host:port/console 

In this URL, host is the host name or IP address of the machine on which the Administration Server is running and port is the address of the port at which the Administration Server is listening for requests (by default, 7001).

The system prompts you to enter a user ID and password. Enter your UserID and password. The system performs an authentication and authorization check: it verifies the user ID and password against the user database.

If you are authorized to work with the console, then the console is displayed in the access mode that the system administrator originally assigned to you: either ReadOnly or Read/Write

How Dynamic Configuration Works

WebLogic Server allows you to change the configuration attributes of domain resources dynamically, that is, while servers are running. In most cases you do not need to restart WebLogic Server for your changes to take effect. When an attribute is reconfigured, the new value is immediately reflected in both the current run-time value of the attribute and the persistent value stored in the XML configuration file.

There are exceptions, however. If, for example, you change a WebLogic Server's listen port, the new address will not be used until the next time you start the affected server. In that case, if you modify the value, you are changing the persistent value stored in the XML file and the current run-time configuration value for the attribute may differ from that persistently stored value. The Administration Console indicates if the persistent and runtime values for a configuration attribute are not the same using an icon which changes to an alert config2.jpg when the server needs to be restarted for changes to take effect.

The console does a validation check on each attribute that users change. The errors that are supported are out-of-range errors and datatype mismatch errors. In both cases, an error popup displays telling the user that an error has occurred.

Once the Administration Console has been started, if another process captures the Listen Port assigned to the Administration Server, you should remove the process that has captured the server. If you are not able to remove the process that has captured the Listen Port assigned to the Administration Server, you must edit the Config.XML file to change the assigned Listen Port. For information about editing the Config.XML file, please see the Configuration Reference.

Planning A Cluster Configuration

When planning a cluster configuration, keep in mind the following constraints on the networking environment and the cluster configuration.

  1. The machine(s) you will be using as WebLogic hosts for the cluster must have permanently assigned, static IP addresses. You cannot use dynamically-assigned IP addresses in a clustering environment. If the servers are behind a firewall and the clients are in front of the firewall, each server must have a public static IP address that can be reached by the clients.

  2. All WebLogic Servers in a cluster must be located on the same local area network (LAN) and must be reachable via IP multicast.

  3. All servers in a cluster must be running the same version of WebLogic Server.

Configure the Servers in your cluster to support the particular mix of services that you are offering.

Server Configuration Tasks

Server configuration tasks that can be accomplished from the Administration Console include:

Cluster Configuration Tasks

Cluster configuration tasks that can be accomplished from the Administration Console include:

Creating a New Domain

This section describes how to create a new domain. The configuration information for all of the WebLogic administrative domains reside in the configuration repository, which is located under the /config directory. Each domain has a separate subdirectory under the /config directory. The name of the subdirectory for a domain must be the name of that domain.

When you first install WebLogic Server software, it is recommended that you create a zip file that has a copy of the default /mydomain configuration directory. You should keep a copy of this zip file as a backup that you can use for creating new domains. This subdirectory contains components that are required for a working configuration, such as a fileRealm.properties file and a configuration file.

To create a new domain, do the following:

  1. Start the Administration Server under an existing domain such as the default mydomain.

  2. Invoke the Administration Console by pointing your browser to:

    http://hostname:port/console

    where hostname is the name of the machine where you started the Administration Server and port is the Administration Server's listen port (default is 7001).

  3. Select mydomain-->Create or edit other domains.

    This displays the domains table.

  4. Select Default-->Create a new Domain.

    Enter the name of the new domain and click Create.

  5. Select the new domain from the list of domains at left to make that the current domain.

  6. Now you will need to create an Administration Server entry for the new domain:

    1. Select Servers-->Create a new Server.

    2. Enter the name of the new Administration Server and click Create.

  7. The Administration Console will have created a new subdirectory with the name of your domain and a configuration file, config.xml, under that subdirectory. Now you need to create an \applications subdirectory in that domain directory. You can create an \applications subdirectory in a command shell or, on Windows, by using Explorer.

  8. Next, copy the Administration Console application to the new \applications directory that you just created. To do this, copy the file console.war from the \applications directory under mydomain to the new \applications directory.

  9. The default mydomain directory contains start scripts for starting the WeLogic Server. For Windows installations, these are startWebLogic.cmd and startManagedWebLogic.cmd. For UNIX installations, these are startWebLogic.sh and startManagedWebLogic.sh. Copy these start scripts to the new domain directory.

  10. You will need to edit the start scripts in a text editor. By default, the name of the domain is set as:

    -Dweblogic.Domain=mydomain

    Replace mydomain with the name of the new domain.

    By default the name of the Administration Server is set as:

    -Dweblogic.Name=MyServer

    Replace MyServer with the name of the new Administration Server.

  11. At the end of the start script there is a cd command:

    cd config\mydomain

    Replace mydomain with the subdirectory name of the new domain. There is also a line in the start script that reads:

    echo startWebLogic.cmd must be run from the config\mydomain directory.

    Replace mydomain here with the name of the new domain.

  12. Copy SerializedSystemIni.dat and fileRealm.properties from the default mydomain directory to your new domain directory. Do not boot the new Administration Server before copying these files.

  13. If you created a password.ini file during installation, you must also copy the password.ini file from the default mydomain directory to the directory for your new domain.

Once you have completed this procedure, you can start the Administration Server for your new domain.

 

Back to Top