Handling System Failure

The backup data will help recover from a system failure. As we shall see, the Administration Server and Managed Servers have different backup considerations. In particular, you can set up the Managed Servers to start without the Administration Server.

13.5.1 Restarting the Administration Server

By default, the Administration Server can discover the presence of any of the Managed Servers running in the domain. Therefore, when the Administration Server shuts down while the Managed Servers continue to run, you don't need to restart the Managed Servers to ensure the Administration Server can regain control of the domain. The Administration Server maintains the current state of all Managed Servers that are under its control in a file called running-managed-servers.xml, which resides under the domain's root directory. The Administration Server uses this file to discover those Managed Servers under its control. You also can disable this discovery of running Managed Servers in the domain by setting the property -Dweblogic.management.discover=false in the startup script for the Administration Server. We do not recommend that you do this.

However, if a system crash has corrupted your WebLogic installation or prevents you from restarting the Administration Server on the same machine, you need to restore the Administration Server on another machine and let it regain control over the Managed Servers. Typically, you will need to take the following series of steps:

  1. Install WebLogic on the new machine.
  2. Make the application files available to the Administration Server again. The applications must be available in the same relative locations on the new machine as on the filesystem on which they were originally deployed.
  3. Copy the backed-up configuration and security data to the new machine, and make sure you place the data in the same folders as the backup.

An Administration Server that is started in this way should rediscover all of the Managed Servers that were under its control before it shut down. When the Administration Server starts, it communicates its new IP address to all of the Managed Servers under its control. In this way, you can continue to administer the Managed Servers, even after the Administration Server is restarted on a different machine.

The Administration Server will not discover Managed Servers that were started while it was down.

 

13.5.2 Restarting Managed Servers

During startup, a Managed Server retrieves its configuration data from the Administration Server. If the Administration Server is running, the Managed Server will boot with the configuration data that it is sent. However, if the Administration Server is down, the Managed Server must read its configuration and security settings from the filesystem. In this case, a server will start in Managed Server Independence mode i.e., in the absence of the Administration Server. Note that you cannot modify the configuration of a Managed Server that is started in this mode, until it reestablishes contact with the Administration Server.

If a Managed Server needs to start in the absence of the Administration Server, it needs access to the configuration data and security files. Normally, only the Administration Server needs access to the domain's config.xml file. However, because we are booting in Managed Server Independence mode, the Managed Server also must have access to this file. In WebLogic 8.1, the config.xml file must be renamed to the msi-config.xml file for the Managed Server. You must not rename it in WebLogic 7.0.

The root directory for a Managed Server defaults to the directory from which the startup script was executed. If a Managed Server runs on the same machine as the Administration Server and shares the same root directory, the Managed Server will locate these files automatically. Otherwise, these files can be made available in a number of ways:

  • The easiest way is to just copy the files from a backup store. They have to be placed in the root directory of the server being started.
  • An alternative is to point the server to a different root directory that does contain these files, using the -Dweblogic.RootDirectory=path startup option.
  • Finally, if you have enabled replication of domain configuration files, all the necessary configuration files already will be present in the root directory. However, if you are using a boot.properties file during startup, this must be copied over to the right location. The boot identity file is not considered part of the domain configuration, and is therefore ignored during replication. In the next section, we look at how to enable replication of the domain configuration data.

A Managed Server started in this way will first attempt to communicate with the Administration Server. Because the Administration Server is shut down, a connection exception will occur, which you can safely ignore. After this, it will try to read the configuration files from its root directory, and then boot itself up.

You cannot use the Node Manager to start a server in Managed Server Independence mode. The Node Manager can monitor only Managed Servers under the control of the Administration Server.

 

13.5.2.1 Managed Server Independence mode

By default, a Managed Server can start in Managed Server Independence mode. You can use the Administration Console to disable this mode. Select the server from the left pane, and then under the Advanced options in the Configuration/Tuning tab, deselect the Managed Server Independence Enabled option. When this option is disabled, the server will not start in the absence of the Administration Server, even if the necessary configuration and security files are present.

This tab includes another option, MSI File Replication Enabled, which determines whether the domain configuration files will be replicated to all Managed Servers. By default, this setting is not enabled. When activated, the domain configuration file and SerializedSystemIni.dat file are replicated to all Managed Servers every 5 minutes. In WebLogic 8.1, the config.xml file is replicated under a new name, msi-config.xml. So, if the file replication has been enabled, each Managed Server should create its own msi-config.xml file, which will be used only to reboot in Managed Server Independence mode.

Be careful of increased administration traffic when replicating potentially large configuration files across servers. In addition, do not enable the replication of domain configuration files if a server shares its installation or root directory with another server. It could result in unpredictable errors for both servers.

A Node Manager cannot be used to remotely start a Managed Server in the absence of the Administration Server, even if the Managed Server Independence mode has been enabled. If you cannot get the Administration Server up but still want to start a Managed Server, you must start it manually from the command line.

Introduction

Web Applications

Managing the Web Server

Using JNDI and RMI

JDBC

Transactions

J2EE Connectors

JMS

JavaMail

Using EJBs

Using CMP and EJB QL

Packaging and Deployment

Managing Domains

Clustering

Performance, Monitoring, and Tuning

SSL

Security

XML

Web Services

JMX

Logging and Internationalization

SNMP



WebLogic. The Definitive Guide
WebLogic: The Definitive Guide
ISBN: 059600432X
EAN: 2147483647
Year: 2003
Pages: 187

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net