I have also add ant task to automate the mod_jk 1.2.15 status worker operations.
The tomcat-jkstatus-ant.jar exits inside tomcat 5.5.14 release.

Here my example: Please, change the worker names


----- begin example jkstatus.xml
?xml version="1.0" encoding="ISO-8859-1"?>
<!-- @author Peter Rossbach -->

<project name="status"
         default="status" basedir=".">

    <property name="profile" value=""/>
    <property file="jkstatus${profile}.properties"/>
    <property file="jkstatus${profile}.properties.default"/>
<property name="catalina.home" location="opt/apache- tomcat-5.5.14"/>

    <path id="jkstatus.path">
<pathelement location="${catalina.home}/bin/commons-logging- api.jar"/> <pathelement location="${catalina.home}/server/lib/catalina- ant.jar"/> <pathelement location="${catalina.home}/server/lib/tomcat- jkstatus-ant.jar"/> <pathelement location="${catalina.home}/server/lib/tomcat- util.jar"/>
    </path>

    <taskdef resource="org/apache/jk/status/jkstatus.tasks">
       <classpath refid="jkstatus.path"/>
    </taskdef>

    <!--
######################################################################## ################################
       public
######################################################################## ################################
    -->
    <target name="status"
            depends="-status-modjk-access"
            description="got jk status" />

    <target name="reset"
            depends="-status-modjk-reset"
            description="reset jk status" />

    <!--
######################################################################## ################################
       private
######################################################################## ################################
    -->

   <target name="-status-modjk-access">
      <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                resultproperty="jkstatus"
                failOnError="false"/>
      <echoproperties prefix="jkstatus" />
      <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                loadbalancer="loadbalancer"
                resultproperty="lb"
                failOnError="false"/>
      <echoproperties prefix="lb" />
      <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                worker="node01"
                resultproperty="worker"
                failOnError="false"/>
     <echoproperties prefix="worker" />
     <jkUpdate url="${jkstatus.url}"
               username="${jkstatus.username}"
               password="${jkstatus.password}"
               workerLoadFactor="${worker.node01.lbfactor}"
               workerRedirect="${worker.node01.redirect}"
               workerClusterDomain="d20"
               workerDisabled="true"
               workerStopped="false"
               workerLb="${worker.node01.lb.name}"
               worker = "node01"
               workerType = "worker"/>
      <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                worker="node01"
                resultproperty="workerafter"
                failOnError="false"/>
      <echoproperties prefix="workerafter" />
   </target>

   <target name="-status-modjk-reset">
      <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                resultproperty="jkstatus.before"
                failOnError="false"/>
      <echoproperties prefix="jkstatus.before" />

      <jkReset  url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                workerLb="loadbalancer"
       />

       <jkStatus url="${jkstatus.url}"
                username="${jkstatus.username}"
                password="${jkstatus.password}"
                resultproperty="jkstatus.after"
                failOnError="false"/>
      <echoproperties prefix="jkstatus.after" />
   </target>

</project>
----- end example jkstatus.xml
--- jkstatus.properties.default --
jkstatus.host=localhost
jkstatus.port=80
jkstatus.username=manager
jkstatus.password=tomcat
jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
--- jkstatus.properties.default --

Regards
Peter

Am 30.12.2005 um 13:12 schrieb Wolfgang Hackl:

I would like to remove a Tomcat node from the cluster without first
shutting it down to allow any requests in progess to complete.  Is it
possible to instruct Apache to stop routing requests to the node and
failover another node yet allow all requests in progress to complete.

You can do this via the status worker. It has a web interface.

I tried updating the workers.properties file and setting disabled=True
but it did not have any effect.  It seems Apache does not re-read the
file after a modification.

Apache doesn't re-read its configuration. On a Unix-like operating system
Apache can reload the configuration, however.

Kind regards,
Wolfgang

--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to