On 06.03.2009 18:57, Mohit Anchlia wrote:
So I created new JkMount /JkStatus status under VirtualHost. Went to
the page and saw different properties, it looks like I need to change
the Activation on individual worker. When I click "E" in front of that
worker it takes me to the page where I can edit the activation
property. I think if I set it to "stopped" balancer will take it out
of service. Only question I have is how can I automatically do that.
Can I do something like:
http://10.10.80.55/JkStatus?cmd=edit&from=list&w=tc&sw=appfe1&activation=stopped
Yes you can. All requests to the status worker are GET requests, so
everything you can do in the GUI you can also put into a script. Simply
copy the URLs form your browser.
The documentation page also lists all request attributes with their meaning.
According to this page you need to use "vwa=s" instead of
"activation=stopped" (at least for version 1.2.27; "s" instead of
"stopped" is not important, but "vwa" instead of "activation" is).
You can also add mime=txt so that your script gets back an easier to
understand answer.
or something like that automatically will change the activiation as I
move servers in and out of service?
You can write a script for this, that uses the above URLs with a tool
like e.g. curl.
Caution:
1) Secure the URL. Your web server has ways to do that, e.g. with a user
and password.
2) Activation changes via the status worker are not persistent. When
your web server is restarted, activation switches back to what is in
your workers.proprties. If you want to change activation in a persistant
way, you also have to change your workers.properties.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org