IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & industry solutions      Support & downloads      My IBM     
developerworks > My developerWorks >  Dashboard > WebSphere Virtual Enterprise > On demand router scripts
developerWorks
Log In   View a printable version of the current page.
On demand router scripts
Added by CarrieMiller, last edited by CarrieMiller on Oct 17, 2008  (view change)
Labels: 
(None)

If you log in with your developerWorks ID, you can leave comments and feedback for the development team.
WebSphere Virtual Enterprise Version 6.1.1

On demand router scripts

You can use Jacl and Python scripts to create, delete, or debug an on demand router (ODR) from the command line.

You can use scripts to perform the following tasks on the ODR:

  • [Dita2Wiki file name not found]
  • [Dita2Wiki file name not found]
  • [Dita2Wiki file name not found]

Create an ODR

Use the createodr.jacl script to create an ODR server. At installation time the script is copied onto the installation target machine(s) in the install_root\bin directory.

To create an ODR, you must have administrator or configurator privileges.

To run createodr.jacl with wsadmin, use the following command:

wsadmin -f createodr.jacl nodename
In place of nodename use the name of the node upon which you want to create your ODR. You might need to modify wsadmin to wsadmin.sh or wsadmin.bat, depending upon your operating environment.

In Version 6.1, a template parameter is required. Options for odr_templates are: odr, http_sip_odr_server, http_sip_odr_server. For example,

wsadmin.bat -f createodr.jacl nodename <odr>

For the z/OS(R) operating system, options for odr_templates are: odr_zos, http_sip_odr_server_zos, http_sip_odr_server_zos. For example,

/wsadmin.sh -f createodr.jacl nodename odr_zos

You might be more comfortable with first launching the scripting client. You might be more comfortable with first launching the scripting client. See the Getting started with scripting article in the WebSphere(R) Application Server information center for more information. In wsadmin:

wsadmin> source createodr.jacl  
wsadmin> createodr nodename
In place of nodename use the name of the node upon which you want to create your ODR.

Delete an ODR

You can use the deleteodr.jacl script to delete an ODR server. At installation time the script is copied onto the installation target machine(s) in the <install_root>\bin directory.

To delete an ODR, you must have administrator or configurator privileges.

To start the deleteodr.jacl script with wsadmin, use the following command:

wsadmin -f deleteodr.jacl nodename
In place of nodename use the name of the node upon which your ODR exists. You might need to modify wsadmin to wsadmin.sh or wsadmin.bat, depending upon your operating environment.

You might be more comfortable with first launching the scripting client. See the "Getting started with scripting" article in the WebSphere(R) Application Server information center for more information. In the wsadmin tool:

wsadmin> source deleteodr.jacl  
wsadmin> deleteodr nodename
In place of nodename use the name of the node upon which your ODR exists.

Diagnose HTTP errors that the ODR returns

You can use the odrDebug.py script to diagnose errors that the ODR returns, such as 404 errors and 503 errors.

You can specify the following parameters:

  • nodeName Specifies the name of the node that you want to debug.
  • odrName Specifies the name of the ODR that you want to debug.
  • errorCode Specifies the HTTP error code. You can specify 404, 503, and so on.
  • expression Specifies if the error code is being debugged. Specify false to disable debugging when the error occurs. Specify true to have debugging enabled when the error occurs.
  • debugLevel Specifies how much information is provided for debugging. You can use one of the following debug levels:
  • 0: prints a concise description on a single line.
  • 1: prints a subset of target.xml file information.
  • 2: prints the entire target.xml file.

*Example usage*

      # cd $WASHOME/bin 
      # ./wsadmin.sh -lang jython -f odrDebug.py setHttpDebug my_node my_ODR 503 true 1  

Example output

If a 503 error occurs because no servers have been started, the SystemOut.log file contains the following message:

[11/3/07 19:20:00:427 EDT] 00000034 HttpDebugResp I   URL: http://draco02.rtp.raleigh.ibm.com:80/A/CpuAndSleepBound,   
statusCode: 503, *reason: no servers in cluster xd61/DC1 are running web module xd61/A/microwebapp.war*   
webModule=xd61/A/microwebapp.war      
cluster=xd61/DC1         
server=xd61/draco03/DC1_draco03            
state=STOPPED           
weight=0            
reachable=true         
server=xd61/draco04/DC1_draco04            
state=STOPPED            
weight=0            
reachable=true         
server=xd61/draco05/DC1_draco05            
state=STOPPED            
weight=0            
reachable=true         
server=xd61/draco06/DC1_draco06            
state=STOPPED            
weight=0            
reachable=true         
server=xd61/draco07/DC1_draco07            
state=STOPPED            
weight=0            
reachable=true

Related links

Wiki Disclaimer and License
Copyright IBM Corporation 2007,2008,2009. All Rights Reserved.

Content source for this Wiki page: todrscript.dita


    About IBM Privacy Contact