How to gracefully remove cluster members temporarily from the HTTP Plugin Load Balancer using provided wsadmin jacl scripts
 Technote (troubleshooting)
 
Problem(Abstract)
In certain situations, such as to perform maintenance, it maybe be desirable to gracefully remove a specific cluster member or members on a specific node in order.
 
Cause
This procedure can be used by customers who need a fast, easy, and error message free method of removing a cluster member or members from their current HTTP Plugin Load Balancing configuration due to planned or unplanned outages.

This fail-over procedure could be used for many reasons such as bypassing an infrastructure problem or an application related problem on a particular machine. Another example where this could be used would be to isolate an application that has just been updated via a Hot-Deployment on a specific node which can provide the following advantages:

  • During the restart of an application, error messages will not be shown to customers;
  • Tests and procedures can be executed before externalizing the application to customers.
 
Resolving the problem
When you use a Network Deployment clustered environment and the plugin is configured using the Round Robin policy for balancing the requests (which is the default), the HTTP Plugin uses the LoadBalanceWeight parameter to decide which cluster member will handle the next request. This will occur unless the next request has session affinity and sends the CloneID parameter to identify session affinity with a particularly cluster member.


This solution is based on the script model and uses the wsadmin tool to change the parameters LoadBalanceWeight to 0 (zero) and CloneID to -1 for a cluster member. After the configuration is refreshed, the HTTP Plugin will no longer choose this cluster member to route new requests to, so it is not necessary stop the cluster member.


Prerequisite: We recommended that you configure the RefreshInterval parameter in the plugin-cfg.xml file in order to define a time interval for HTTP Plugin configuration refresh.

Download the httpplugin.jacl file attached and execute the procedures as per the following examples:

  • Removing all servers on specific node from Load Balancing
wsadmin.bat -f "D:/temp/httpplugin.jacl" httppluginnodeoffline marceloe
WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in

the argv variable: "[httppluginnodeoffline, marceloe]"

Http Plugin cluster member config change

server1 Session affinity disabled (CloneID changed to -1)
server2 Session affinity disabled (CloneID changed to -1)
MarceloeNode02 is now offline

Http Plugin generate v6

MarceloeNode02/webserver
Propagate requested
Http Plugin regen done

Node Synchronization

Node MarceloeNode02 synchronized
Node marceloeNode01 synchronized
Node ntf3Node01 synchronized
Node ntf3Node02 NOT synchronized - nodeagent is not active

  • Adding all servers on specific node to Load Balancing
wsadmin.bat -f "D:/temp/httpplugin.jacl" httppluginnodeonline marceloe
WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in

the argv variable: "[httppluginnodeonline, marceloe]"

Http Plugin cluster member config change

server1 weight changed from 0 to 8
server1 Session affinity enabled (CloneID default)
server2 weight changed from 0 to 8
server2 Session affinity enabled (CloneID default)
MarceloeNode02 is now online

Http Plugin generate v6

MarceloeNode02/webserver
Propagate requested
Http Plugin regen done

Node Synchronization

Node MarceloeNode02 synchronized
Node marceloeNode01 synchronized
Node ntf3Node01 synchronized
Node ntf3Node02 NOT synchronized - nodeagent is not active

  • Verifying the current status for Load Balancing
wsadmin.bat -f "D:/temp/httpplugin.jacl" httppluginnodestatus
WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in

the argv variable: "[httppluginnodest
atus]"

Http Plugin cluster member config status

MarceloeNode02 offline
ntf3Node01 online
ntf3Node02 online

  • Help about all tasks available

wsadmin.bat -f "D:/temp/httpplugin.jacl"
WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
-------------------------------------------------------------------------
Invalid task, reenter with a valid task:

httppluginclusterstatus
httppluginnodestatus

httppluginnodeonline host |enableaffinity| optional param enableaffinity
httppluginnodeoffline host |disableaffinity| optional param disableaffinity
httppluginserveronline host servername |enableaffinity| optional param enableaffinity
httppluginserveroffline host servername |disableaffinity| optional param disableaffinity
httppluginserverallonline host |enableaffinity| optional param enableaffinity
httppluginserveralloffline host |disableaffinity| optional param disableaffinity

httpplugingenerate |syncnodes| optional param syncnodes (Full Resynchronize)
httpplugingeneratev5 |syncnodes| optional param syncnodes (Full Resynchronize)
httpplugingeneratev6 |syncnodes| optional param syncnodes (Full Resynchronize)
syncnode host
syncnodeall

e.g.: wsadmin -f /myscripts/httplugin.jacl httppluginnodeonline myhost

-------------------------------------------------------------------------

  • Sample additional tasks
wsadmin.bat -f "c:\httpplugin.jacl" httppluginserveroffline Marceloe server1

WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
available as arguments that are stored in the argv variable: "[httppluginserver
offline, Marceloe, server1]"

Http Plugin cluster member config change

Session affinity disabled (CloneID changed to -1)
ClusterMember server1/MarceloeNode02 weight changed from 2 to 0
server1/MarceloeNode02 is now offline

Http Plugin generate v6

MarceloeNode02/webserver
Propagate requested
Http Plugin regen done

Node Syncronization

Node MarceloeNode02 syncronized


wsadmin.bat -f "c:\httpplugin.jacl" httppluginclusterstatus

WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are
available as arguments that are stored in the argv variable: "[httpplugincluste
rstatus]"

Http Plugin cluster member config status


server1 0 noaffn (cluster1)
server2 2 affn (cluster1)
MarceloeNode02 online


wsadmin.bat -f "c:\httpplugin.jacl" httpplugingenerate

WASX7209I: Connected to process "dmgr" on node NodeDmgr using SOAP connector; The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[httpplugingenerate]"

Http Plugin generate v6

MarceloeNode02/webserver
Propagate requested
Http Plugin regen done

Node Syncronization

Node MarceloeNode02 syncronized


Additional information: See the section "User Environments" on httpplugin.jacl to configure your environment settings such as IBM® WebSphere® Application Server configroot and other optional configurations.

z/OS® customers:There are new options introduced by APAR PK07234 that achieve similar results for HTTP and extend for other protocols. Basically you can use the z/OS modify commands to control if the server will accept work:

f <server>, pauselisteners
f <server>, resumelisteners
 
Related information
Altering the plug-in Load Balancing and Fail Over optio
PK07234:WORKLOAD BALANCE IN A CLUSTER ENVIRONMENT
PK05477: WORKLOAD BALANCE IN A CLUSTER ENVIRONMENT WHEN
 
httpplugin.jacl
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Plug-in
Operating system(s): z/OS
Software version: 6.1
Software edition:
Reference #: 1247728
IBM Group: Software Group
Modified date: Oct 23, 2006