-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 All,
On 1/12/15 2:01 PM, Christopher Schultz wrote: > I'm running into a bit of difficulty scripting updates for > load-balancer members and thought I'd ask here before slogging > through the code to see if there are any requirements I'm missing. > > Long story short, I'd like to script setting the "activation" > status for a particular load-balanced worker to something, like ACT > or DIS. > > I've written a python script to do this for me and I can confirm > with Wireshark that it's sending what I expect. Here is the HTTP > request that is being sent: > > " POST /jk-status HTTP/1.1 Accept-Encoding: identity > Content-Length: 43 Host: localhost Content-Type: > application/x-www-form-urlencoded Connection: close User-Agent: > mod_jk.py / Python-urllib > > > from=list&cmd=update&sw=myworker&vwa=1&w=lb " > > That's the whole request. The response I get is a 200 response, > but it's got the form content in it again, and not the "you will > be redirected in 3 seconds" response that I get from the web UI. > > I can think of a few things that I just wanted to sanity check: > > 1. I need to provide all of the various values and not just the > "vwa" value (which is the short-code request parameter value for > the "activation" status). > > 2. The status worker can't handle POST requests (the web interface > uses GET). > > 3. I've broken something else. > > Can anyone confirm either 2 or 3 above, or both? I tried switching to GET and so I'm using this URL, now: GET /jk-status?from=list&cmd=update&sw=myworker&vwa=0&w=lb HTTP/1.1 Accept-Encoding: identity Host: localhost Connection: close User-Agent: mod_jk.py / Python-urllib (Note that the load balancer worker's name is "lb" and the balanced worker is called "myworker") I'm getting a 200 response with the expected "You will be redirected in 3 seconds" page, but the value for the activation of this worker is not actually being updated. So, it seems that the data must be in the URL (i.e. GET) but something is still not working as I expect. Can anyone shed some light on what I might be missing? I can probably change the order of the parameters if that's what's required... I'm using a python dictionary (an unordered name/value hash) to build my request parameters which is automatically converted to URL parameters, but they are unordered. I could put them in order if that is likely to change anything. Thanks, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUtByCAAoJEBzwKT+lPKRYjmQP/iJ0ggLp53HJ1bH+Y2hpEcYs Hsirpjl2BraLjuA/gSHRzw1PZ0Kd/rkn6h+S79aF6LxCg3hjNQtAgej7tuohxCjq HfNIjMQ0kiHIgmpcFr14tRAGehs/1ujai3MMjnd45OrCvGtFOMdQIIcTyrhClEOd 4/gB0O8qO6gvpj953shDv5wnGpnXMqvkFzIhIgNbprVChGuccEEtVwTJ3iWKgt0Z isKYJK65idRFl7NWGRZfygiE30kqaH1j8di5KpD/TNs5ACoDe3kioKArtIuB05QM +3JB8Hxbekt4TiOFELm1vRaIk3/2GLR9Jd3TBF6R6O3HXte0CLE2ZjDlkwYVHaqp ooNJt9Vq81y0XfO1m5KpCMPFSOaYzfZrR/uyEzvFwemGx7LyQDe6645Bw2R7Lux9 +K3XvRQ04OheA8lCSfF+Q6Wp24KES3wm8/pfuFVESq0qadJ5kk6T6CXUNQRk3fZP LOWHD6T0sQwtXQKy0zpB+Ey8JMa5oK2Cn7bM35KtYTKgV1Ki6QA+sQaimW9W87fB ov7dp9+EWL3BO0FOr2xw6HzC9ZDT6LLcyxAk3u7UFvVwEnftN4E3XAxqCeC4K7Za nyntOsHM92+waaF7P4EZFsXPO3k/qWyv6W+Oz9oDFTXHlQs8p0n750l+Fb6yGZg4 sIgLFefQIn31sBnH5/O0 =EYxQ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org