Thursday, June 23, 2011

WebLogic Server LifeCycle and Server States

The series of states through which a WebLogic Server instance can transition itself from one state to next state is called the WebLogic Server life cycle. At any time, a WebLogic Server instance is in a particular operating state. Commands such as start, stop and suspend sources specific changes to the operational state of a server instance.

Below diagram illustrates the Weblogic Server life cycle with different states the Weblogic Server can transition itself.


Understanding the States in the WebLogic Server Life Cycle 
You can make use either the WebLogic Administration Console or the weblogic.Admin weblogic utility to explicitly move the WebLogic Server to a new state. The following is various states the server can transition itself during its life cycle.

SHUTDOWN
A server is said to be in the shutdown state when it is not running. When a server is in the SHUTDOWN state, the only thing you can do is start it. 

RUNNING > SUSPENDING > STANDBY > SHUTTING DOWN > SHUTDOWN

STARTING
A server is said to be in the starting state when a start command has been issued by a startup script, Node Manager or other Weblogic Utilities. In the STARTING state, a server instance cannot accept any client or administrative requests. During the Admin server instance STARTING obtains its domain configuration data including the domain security configuration, from its config directory. During the Managed server instance STARTING it contacts the Administration Server for its configuration and security data.

<Jun 22, 2011 10:20:48 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING> 

SHUTDOWN > STARTING > RUNNING
SHUTDOWN > STARTING > STANDBY

STANDBY
A server is capable of moving into the STANDBY state if and only if Administration port has been configured for that server. Otherwise, the server will move directly from the starting state to the running state. If the server is configured to start in STANDBY state without Administration port opened then it would immediately goto FAILED state as per error below. When a server is in the STANDBY state, all services are initialized and all application get deployed. With the exception of the administration port, however, all ports are closed. Therefore, the server is said to be in hot STANDBY and ready to go. 

####<Jun 22, 2011 5:10:40 PM MDT> <Notice> <WebLogicServer> <NAND-W7> <ManagedServer_1> <main> <<WLS Kernel>> <> <> <1308784240405> <BEA-000365> <Server state changed to STANDBY>
####<Jun 22, 2011 5:10:40 PM MDT> <Notice> <WebLogicServer> <NAND-W7> <ManagedServer_1> <main> <<WLS Kernel>> <> <> <1308784240406> <BEA-000360> <Server started in STANDBY mode>

Server configured to start in STANDBY but no Administration Port opened
<Jun 22, 2011 10:29:46 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Jun 22, 2011 10:29:46 PM GMT> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: StartupMode is set to STANDBY. Server cannot start in STANDBY state without admin channel. Server will shutdown now.>
<Jun 22, 2011 10:29:46 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>

SHUTDOWN > STARTING > STANDBY
RUNNING > SUSPENDING > STANDBY > SHUTTING DOWN > SHUTDOWN 
any state > STANDBY > SHUTDOWN

RUNNING
When a server is in the running state, it is fully functional, offers its services to clients and participating as a regular member of a WebLogic domain. 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. 

####<Jun 23, 2011 10:48:08 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <main> <<WLS Kernel>> <> <> <1308847688806> <BEA-000365> <Server state changed to RUNNING>
####<Jun 23, 2011 10:48:08 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <main> <<WLS Kernel>> <> <> <1308847688818> <BEA-000360> <Server started in RUNNING mode>
 

SHUTDOWN > STARTING > RUNNING 
STANDBY > RESUMING > RUNNING

RESUMING
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 and transitions through the RESUMING state when you issue the Start command.

####<Jun 23, 2011 11:11:40 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <main> <<WLS Kernel>> <> <> <1308849100330> <BEA-000365> <Server state changed to RESUMING> 

STANDBY > RESUMING > RUNNING

SUSPENDING
A server is moved into the suspending state during a graceful shutdown or suspend. This allows the server to complete any processing it may be working on to enable a clean shutdown without loss of any important state information. This state will be skipped during a forced shutdown. During this transitional state, WebLogic Server performs the operations required to place itself in the ADMIN state

####<Jun 23, 2011 11:00:38 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1308848438424> <BEA-000365> <Server state changed to SUSPENDING>
####<Jun 23, 2011 11:00:38 AM MDT> <Notice> <HTTP> <NAND-W7> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1308848438440> <BEA-101278> <There are no active sessions. The Web service is ready to suspend.>


RUNNING > SUSPENDING > ADMIN 

FORCE_SUSPENDING
A server is moved into the suspending state during a Forceful shutdown or Force suspend. This allows the server to cause loss of any important state information. During this transitional state, WebLogic Server performs the operations required to place itself in the ADMIN state.

####<Jun 23, 2011 11:28:36 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1308850116168> <BEA-000365> <Server state changed to FORCE_SUSPENDING>
####<Jun 23, 2011 11:28:36 AM MDT> <Notice> <Server> <NAND-W7> <AdminServer> <DynamicListenThread[Default[2]]> <<WLS Kernel>> <> <> <1308850116176> <BEA-002607> <Channel "Default[2]" listening on 10.1.36.206:7001 was shutdown.>

RUNNING > FORCE SUSPENDING > ADMIN

SHUTTING DOWN
A server will be moved into the shutting down state after it receives a shutdown command. If the server is in the running or standby state when the shutdown command is received, it shuts down gracefully & completing any pending transactions in  progress, terminating all services and executing any configured shutdown classes. 

####<Jun 23, 2011 11:54:05 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1308851645844> <BEA-000365> <Server state changed to SHUTTING_DOWN>

RUNNING > SUSPENDING > STANDBY > SHUTTING DOWN > SHUTDOWN

FORCE_SHUTTING DOWN 
A server will be moved into the force_shutting_down state after it receives a force_shutdown command. If the server is in the running or standby state when the shutdown command is received, it shuts down forcefully, terminating all services and executing any configured shutdown classes. 

####<Jun 23, 2011 11:47:45 AM MDT> <Notice> <WebLogicServer> <NAND-W7> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1308851265079> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>

RUNNING > FORCE SUSPENDING > STANDBY > FORCE_SHUTTING DOWN > SHUTDOWN 

FAILED
A server is moved into the failed state when the health monitoring service determines that a critical service is not functioning properly during its life cycle or might be due to misconfiguration during the restart of the server. Once a server is put into the failed state, it can only be shut down. If you have enabled health monitoring, the Node Manager can automatically shut down and restart the server if it fails.

<Jun 22, 2011 10:29:46 PM GMT> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: StartupMode is set to STANDBY. Server cannot start in STANDBY state without admin channel. Server will shutdown now.>
<Jun 22, 2011 10:29:46 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>


RUNNING > FAILED
SHUTDOWN > STARTING > STANDBY > FAILED 

UNKNOWN
A server is said to be in the UNKNOWN state if it cannot be contacted.

3 comments:

Anonymous said...

If UNKNOWN state for Managed servers then restart admin server so it resets states of Managed servers

Anonymous said...

If UNKNOWN state for Managed servers then restart admin server so it resets states of Managed servers

Unknown said...

Is there a way to get an email on weblogic server sstates using shell script(sendmail)