Thursday, April 25, 2013

Server Life Cycle & Ser ver States

Getting and Using Server State

WebLogic Server displays and stores information about the current state of a server instance, and state transitions that have occurred since the server instance started up. This information is useful to administrators who:
  • Monitor the availability of server instances and the applications they host
  • Perform day-to-day operations tasks, including startup and shutdown procedures
  • Diagnose problems with application services
  • Plan corrective actions, such as migration of services, when a server instance fails or crashes
Server States

SHUTDOWN State

In the SHUTDOWN state, a WebLogic Server instance is configured but inactive.
A server instance enters the SHUTDOWN state as result of a Shutdown or Force Shutdown command. In addition, a server instance can kill itself when it detects, as a result of self-health monitoring, that it has become unstable. Only a server instance with its Auto Kill If Failed attribute is true will kill itself when it detects that it is failed


STARTING State

During the STARTING state, a WebLogic Server instance transitions from SHUTDOWN to STANDBY, as a result of a Start, Start in Admin, or Start in Standby command.
In the STARTING state, a server instance cannot accept any client or administrative requests.
The server instance obtains its configuration data:
  • An Administration Server retrieves domain configuration data, including the domain security configuration, from its config directory.
  • A Managed Server contacts the Administration Server for its configuration and security data. If the Managed Server is configured for SSL communications, it uses its own certificate files, key files, and other SSL-related files and contacts the Administration Server for the remaining configuration and security data.
Note: If the Managed Server cannot contact its Administration Server, by default, it starts up in Managed Server Independence mode, using its locally cached copy of the domain configdirectory.

STANDBY State

A server instance in STANDBY does not process any request—its regular Listen Port is closed. The Administration Port is open, and accepts life cycle commands that transition the server instance to either the RUNNING or the SHUTDOWN state. Other Administration requests are not accepted.
Starting a server instance in standby is a method of keeping it available as a "hot" backup, a useful capability in high-availability environments.
The only life cycle command that causes a server instance to enter the STANDBY state and remain in that state is the Start in Standby command. A server instance transitions through the STANDBY state when you issue a Start or a Start in Admin command.

ADMIN State

In the ADMIN state, WebLogic Server is up and running, but available only for administration operations, allowing you to perform server and application-level administration tasks without risk to running applications. When a server instance is in the ADMIN state:
  • The Administration Console is available.
  • The server instance accepts requests from users with the admin role. Requests from non-admin users are refused.
  • Applications are activated in the application ADMIN state. They accept requests only from users with the admin role. A user with the admin role can continue to run any application that is deployed on a server in a suspended state.
  • The JDBC, JMS, and JTA subsystems are active, and administrative operations can be performed upon them.
Note: You do not have to be an admin user to use these subsystems when the server is in a suspended state.
  • Deployments or re-deployments are allowed, and take effect when you transition the server instance from the ADMIN to the RUNNING state (using the Resume command).
  • ClusterService is active and listens for heartbeats and announcements from other cluster members. It can detect that other Managed Servers have joined the cluster, but is invisible to other cluster members.
You can transition a server instance to the ADMIN state using the Start in Admin, Suspend, or Force Suspend commands.
A server instance transitions through the ADMIN state as a result of Start, Shutdown, and Force Shutdown commands.
You can transition a server instance in the ADMIN state to RUNNING with the Resume command, or to SHUTDOWN, with the Shutdown or Force Shutdown command.

RESUMING State

During this transitional state, WebLogic Server performs the operations required to move itself from the STANDBY or ADMIN state to the RUNNING state.
A server instance transitions to the RESUMING state when you issue the Resume command. A server instance transitions through the RESUMING state when you issue the Start command.

RUNNING State

In the RUNNING state, WebLogic Server is fully functional, offers its services to clients, and can operate as a full member of a cluster.
A server instance transitions to the RUNNING state as a result of the Start command, or the Resume command from the ADMIN or STANDBY states.
You can transition a server instance in the RUNNING state to the SUSPENDING state or the FORCE_SUSPENDING state using graceful and force Suspend and Shutdown commands.

SUSPENDING State

During this transitional state, WebLogic Server performs the operations required to place itself in the ADMIN state, suspending a subset of WebLogic Server subsystems and services in an ordered fashion, and completing a predefined portion of the application work currently in process ("in-flight" work).
A server instance transitions to the SUSPENDING state when you issue the Suspend command. A server instance transitions through the SUSPENDING state when you issue a Shutdown command.

FORCE_SUSPENDING State

During this transitional state, WebLogic Server performs the operations required to place itself in the ADMIN state, suspending a subset of WebLogic Server subsystems and services in an ordered fashion. During the FORCE_SUSPENDING state, WebLogic Server does not complete in-flight work gracefully; application work in progress is abandoned.
A server instance transitions through the FORCE_SUSPENDING state when you issue the Force Suspend or Force Shutdown command.

SHUTTING_DOWN State

During this transitional state, WebLogic Server completes the suspension of subsystems and services and does not accept application or administration requests.
A server instance transitions to the SHUTTING_DOWN state when you issue a Shutdown or Force Shutdown command.

FAILED State

A running server instance can fail as a result of out-of-memory exceptions or stuck application threads, or if one or more critical services become dysfunctional. A server instance monitors its health, and upon detecting that one or more critical subsystems are unstable, it declares itself FAILED.
A FAILED server instance cannot satisfy administrative or client requests.
When a server instance enters the FAILED state, it attempts to return to a non-failed state. If it failed prior to reaching the ADMIN state, the server instance shuts itself down with an exit code that is less than zero.
       If the server instance fails after reaching the ADMIN state, in the RESUMING or RUNNING state, by default, it returns to the ADMIN state, if the administration port is enabled.
Note: If desired, you can configure a server instance that fails after reaching the ADMIN state, to shut itself down, rather than return to the ADMIN state
A server instance can enter the FAILED state from any other state.

Node Manager and managed server States

Node Manager defines its own, internal managed server states for use when restarting a server. If Node Manager is configured to restart managed servers, you may observe these states in the Administration Console during the restart process.
  • FAILED_RESTARTING - Indicates that Node Manager is currently restarting a failed managed server.
  • ACTIVATE_LATER - Indicates that MaxRestart restart attempts have been made in current RestartInterval, and Node Manager will attempt additional restarts in the next RestartInterval.
  • FAILED_NOT_RESTARTABLE - Indicates that the managed server is Failed or was killed by Node Manager (as a result of the managed server's AutoKillIfFailed attribute being set to True), but Node Manager cannot restart the managed server because its AutoRestart attribute is set to False.


No comments: