Tuesday 24 January 2012

Configuring Node Manager for High Availability of Servers

Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart Administration Server and Managed Server instances from a remote location. Although Node Manager is optional, it is recommended if your WebLogic Server environment hosts applications with high availability requirements.

A Node Manager process can automatically monitor, shutdown, and restart only those Managed Servers that it started. It cannot provide these services for Managed Servers booted directly from the command line.

Configure the Node Manager to connect to the Weblogic domain:
If you are connecting the node manager to the domain for the first time, the Admin Server of the domain should be up and running.
To start the Admin Server, Navigate to the below location:

$ cd MWHOME/user_projects/domains/soa_domain/bin
To start the server, give the below command:

$ ./startWebLogic.sh &

This would start the Admin Server as a background process. The Admin Server would be started once the console shows “Running Mode”
  • Once the Admin Server is started, open a new session in order to connect to the domain through the Node Manager
  • Navigate to “MWHOME/wlserver_10.3/common/bin”

Run the wlst.sh as shown below




  • The next step is to connect to the domain on which the Admin Server is up and running. To connect to the domain please use the syntax as below:
    •  connect('weblogic','<password>','t3://<host name>:<Port on which admin server is running>')
  • After connecting to the Admin Server, we need to enroll the domain with the nodemanager. To enroll the node manager use the below syntax:
    • nmEnroll('<path to the domain>')

Procedure to start and stop the servers:
  • Once the domain is enrolled with the node manager, the next step is to start/stop the servers using the wlst and node manager
  • To connect to the node manager, follow the below steps:
    • Navigate to MWHOME/ wlserver_10.3/common/bin
  • Run the wlst.sh
  • Use the below syntax to connect to the node manager
    • nmConnect('weblogic','<password>','<host name>','<node manager port no.>','<domain name>','<path to the domain>')
After successfully connecting to the node manager, we will be able to start/stop the servers.
We can use various commands to manage the servers using wlst and node manager as mentioned below:

1.       nmServerStatus('<Server Name>'):This would display the current status of the server as:

  • Running
  • Shutdown
  • Failed Not Restartable
  • Unknown
2.  nmStart('<Server Name>') : This would start the server.

3.  nmKill('<Server Name>'): This would shutdown the server.

In this way we can configure Node Manager for high availabilty of weblogic server.
We can even write Custom Scripts using python/jython which is supported in weblogic for managing server.