Bug 900459 (JBPAPP6-1462) - Enabling/Disabling nodes with JK Status Manager does not work
Summary: Enabling/Disabling nodes with JK Status Manager does not work
Keywords:
Status: CLOSED DUPLICATE of bug 2040112
Alias: JBPAPP6-1462
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Apache Server (httpd) and Connectors
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: TBD EAP 6
Assignee: Mladen Turk
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard: connectors eap6_need_triage mod_jk na...
Depends On:
Blocks: JBPAPP6-1159
TreeView+ depends on / blocked
 
Reported: 2012-05-17 16:17 UTC by Jan Stefl
Modified: 2014-06-28 12:33 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Tested on Sol10 x86_64
Last Closed: 2012-10-31 14:35:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
jbpapp-9052.ogv (3.86 MB, video/ogg)
2012-06-07 20:55 UTC, Dominik Pospisil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 900623 0 medium CLOSED Mod_jk: Status manager edit attribute for all members does not work 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPAPP6-1462 0 Major Closed Enabling/Disabling nodes with JK Status Manager does not work 2014-08-05 11:33:51 UTC

Internal Links: 900623

Description Jan Stefl 2012-05-17 16:17:42 UTC
Affects: Release Notes
project_key: JBPAPP6

I found the regression with regards on JBPAPP-8919.
The scenario worked with ER7.

Want disable node worker1:
curl -G -d "cmd=update&mime=prop&w=router&sw=worker1&vwa=1" 127.0.0.1:5080/jkmanager/
curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep activation
>> worker.worker1.activation=ACT
>> worker.worker2.activation=ACT
And both nodes actually serving.

Want disable both nodes worker1,2:
curl -G -d "cmd=edit&mime=prop&w=router&att=vwa&val0=1&val1=1" 127.0.0.1:5080/jkmanager/
>> worker.worker1.activation=ACT
>> worker.worker2.activation=ACT
And both nodes actually serving.


mod_jk.log after disabling seems OK.
info level
{noformat}
[Thu May 17 11:58:17 2012]status 127.0.0.1 0.000319
[Thu May 17 12:02:58 2012][9557:1] [info] jk_status.c (3291): Status worker 'status' setting 'activation' for sub worker 'worker1' of lb worker 'router' to 'DIS'
[Thu May 17 12:02:58 2012]status 127.0.0.1 0.001138
{noformat}

debug
{noformat}
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_uri_worker_map.c (1131): Attempting to map URI '/jkmanager/' from 4 maps
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_uri_worker_map.c (945): Attempting to map context URI '/jkmanager/*=status' source 'uriworkermap'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_uri_worker_map.c (958): Found a wildchar match '/jkmanager/*=status'
[Thu May 17 12:08:02 2012][10175:1] [debug] mod_jk.c (2621): Into handler jakarta-servlet worker=status r->proxyreq=0
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_worker.c (115): found a worker status
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_worker.c (338): Maintaining worker router
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_worker.c (292): Found worker type 'status'
[Thu May 17 12:08:02 2012][10175:1] [debug] mod_jk.c (1097): Service protocol=HTTP/1.1 method=GET ssl=false host=(null) addr=127.0.0.1 name=127.0.0.1 port=5080 auth=(null) user=(null) laddr=127.0.0.1 raddr=127.0.0.1 uri=/jkmanager/
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1275): Status worker 'status' adding request param 'cmd' with value 'update'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1275): Status worker 'status' adding request param 'mime' with value 'prop'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1275): Status worker 'status' adding request param 'w' with value 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1275): Status worker 'status' adding request param 'sw' with value 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1275): Status worker 'status' adding request param 'vwa' with value '1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'cmd' as 'update'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'mime' as 'prop'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 're' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'opt' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (4591): Status worker 'status' service allowed for user '(null)' [(null)] from 127.0.0.1 [(null)]
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'w' as 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'sw' as 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1315): Status worker 'status' checking worker 'router' sub worker 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1391): Status worker 'status' searching worker 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_worker.c (115): found a worker router
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1432): Status worker 'status' searching sub worker 'worker1' of worker 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'w' as 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'sw' as 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1315): Status worker 'status' updating worker 'router' sub worker 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1391): Status worker 'status' searching worker 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_worker.c (115): found a worker router
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (1432): Status worker 'status' searching sub worker 'worker1' of worker 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (4155): Status worker 'status' updating lb worker 'router' sub worker 'worker1'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (3275): Status worker 'status' committing changes for sub worker 'worker1' of lb worker 'router'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwa' as '1'
[Thu May 17 12:08:02 2012][10175:1] [info] jk_status.c (3291): Status worker 'status' setting 'activation' for sub worker 'worker1' of lb worker 'router' to 'DIS'
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwf' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwn' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwr' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwc' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vwd' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vacpt' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vaprt' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vahst' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vapng' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vact' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vapt' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vart' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'var' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vari' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vacpi' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'varo' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_status.c (905): retrieved string arg 'vamps' as '(null)' (default)
[Thu May 17 12:08:02 2012][10175:1] [debug] jk_lb_worker.c (358): syncing shm for lb 'router' from mem (1->0)
[Thu May 17 12:08:02 2012][10175:1] [debug] mod_jk.c (552): written 22 out of 22
[Thu May 17 12:08:02 2012][10175:1] [debug] mod_jk.c (552): written 38 out of 38
[Thu May 17 12:08:02 2012][10175:1] [debug] mod_jk.c (2772): Service finished with status=200 for worker=status
[Thu May 17 12:08:02 2012]status 127.0.0.1 0.001196

{noformat}

Comment 1 Rajesh Rajasekaran 2012-05-17 16:29:58 UTC
Labels: Removed: connectors mod_jk native Added: connectors eap6_need_triage mod_jk native


Comment 2 Mladen Turk 2012-05-21 08:15:44 UTC
That is actually correct behaviour.
The point is that you never used the workerX, so it always uses the configuration file's value.
Try using the worker and then setting the activation.

Eg, Use the following procedure:

1. curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep activation
   This will initialize subworkers
2. curl -G -d "cmd=update&mime=prop&w=router&sw=worker1&vwa=1" 127.0.0.1:5080/jkmanager/
   Now update to DIS
3. curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep activation
   Now it will show worker.worker1.activation=DIS




Comment 3 Mladen Turk 2012-05-21 08:19:34 UTC
Change was deliberate so that workers gets correctly initialized.
You will need to pull values first which will init nodes and then you can update parameters.
The same procedure is done when using web-browser as a client, which is BTW preferred way, so made sure that command line tools follow the same procedure.
In essence any cmd=update should be preceded by show.

Comment 4 Mladen Turk 2012-05-21 08:57:07 UTC
Oops seems we have a bug after all

Comment 7 Mladen Turk 2012-05-21 09:22:07 UTC
As a side note...

I don't think this issue is a blocker.
Further more, anything related to status worker should never be blocker, because its optional component that doesn't influence the overall module functionality.


Comment 10 Mladen Turk 2012-05-21 14:28:13 UTC
Fixed

Comment 11 Misty Stanley-Jones 2012-06-01 04:34:03 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Added: Release Notes


Comment 13 Misty Stanley-Jones 2012-06-01 06:41:06 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Not Required
Affects: Removed: Release Notes 


Comment 14 Dominik Pospisil 2012-06-06 20:00:58 UTC
I have tested that using jboss-eap-native-webserver-connectors-6.0.0.CR1-RHEL5-x86_64.zip. But still, workers disabled from jkstatus page are not disabled and subsequent requests are still beeing routed to them.

Comment 15 Mladen Turk 2012-06-06 20:09:08 UTC
But are the workers disabled?
If so, please don't hijack the issue with something unrelated.


Comment 16 Mladen Turk 2012-06-06 20:09:11 UTC
But are the workers disabled?
If so, please don't hijack the issue with something unrelated.


Comment 17 Rostislav Svoboda 2012-06-07 09:18:25 UTC
Link: Added: This issue is a dependency of JBPAPP-9188


Comment 18 Anne-Louise Tangring 2012-06-07 17:11:26 UTC
Mladen, it sounds like the attempt to disable the workers fail. If that is true, is there a work around that we can give the users to disable the workers in some other way?

Comment 19 Dominik Pospisil 2012-06-07 18:23:50 UTC
I was tring to verify reported issue. You said that that's the correct behaviour, later you say that we have an issue. However, it is absolutelly unclear to me what is the actual issue and what is the correct behaviour. Without that information, it is impossible to verify.

Comment 21 Anne-Louise Tangring 2012-06-07 18:32:27 UTC
Release Notes Docs Status: Removed: Not Required Added: Not Yet Documented
Affects: Added: Release Notes


Comment 22 Mladen Turk 2012-06-07 18:44:03 UTC
Dominik, this issue is abot jk status manager not changing status. AFAICT this now works, so please close this issue. If jkstatus worker cannot change the worker status to disabled only then we have a problem. There are many ways why you can get worker trying to connect even if disabled, but that's not relevant to the problem this JIRA was about. I presume that's clear enough.

Comment 23 Dominik Pospisil 2012-06-07 20:55:04 UTC
Attachment: Added: jbpapp-9052.ogv


Comment 24 Dominik Pospisil 2012-06-07 20:59:19 UTC
I have attached a video showing strange behaviour after disabling a node using status manager. The node stays in ACT state after disabling. After couple of requests, node is switching from ACT do DIS randomly. Let me know if I am doing st wrong. Thanks.

Comment 25 Mladen Turk 2012-06-07 21:30:22 UTC
Could you post the md5sum of the mod_jk.so you are using.
This looks like a stuff we already fixed in 1.2.37 release of mod_jk and which should have been applied as a patch to the latest build, but I'm not sure which one you are using and which one got into the release.

Comment 26 Dominik Pospisil 2012-06-07 21:38:31 UTC
I was using mod_jk from CR1 zips:
http://download.devel.redhat.com/devel/candidates/JBEAP/JBEAP-6.0.0-CR1/native/jboss-eap-native-webserver-connectors-6.0.0.CR1-RHEL5-x86_64.zip

04607d1f609e333dbbd870bb2484b9f3  mod_jk.so


Comment 27 Mladen Turk 2012-06-08 04:40:21 UTC
Right, seems a correct one.
You will have to try with pessimistic locking, but anyway, find this not critical issue, so will have to wait until we fix that upstream in ASF.

Comment 28 Mladen Turk 2012-06-08 05:44:26 UTC
OK, so edit each worker member directly (click 'E' in front of member name) instead using
"Edit this attribute for all members"

Then it works.
Seems there is a bug in that feature of status manager, so you might close this issue
and open a new one named "Edit attribute for all members does not work"

However, that's a minor issue since directly editing members work.



Comment 29 Dominik Pospisil 2012-06-08 08:36:51 UTC
Link: Added: This issue relates to JBPAPP-9315


Comment 30 Dominik Pospisil 2012-06-08 08:37:41 UTC
Closed as requested, created separate JIRA for that issue (JBPAPP-9315).

Comment 31 Rajesh Rajasekaran 2012-06-08 12:39:18 UTC
Thanks for verifying this issue, Dominik.

Comment 32 Tom WELLS 2012-06-11 01:56:30 UTC
Hey guys,

Can I have a bit more information on the fix/result of this bug for the release notes?

Thanks.

Comment 33 Tom WELLS 2012-06-12 04:45:37 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Not Required


Comment 34 Dana Mison 2012-10-16 03:20:37 UTC
Writer: Added: tomwells


Comment 35 Jan Stefl 2012-10-31 14:35:47 UTC
Please follow https://issues.jboss.org/browse/JBPAPP-9315

Comment 36 Anne-Louise Tangring 2012-11-13 20:59:19 UTC
Release Notes Docs Status: Removed: Not Required 
Writer: Removed: tomwells 
Docs QE Status: Removed: NEW 



Note You need to log in before you can comment on or make changes to this bug.