Bug 900363 (JBPAPP6-1260) - JK Status Manager does not work
Summary: JK Status Manager does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: JBPAPP6-1260
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Apache Server (httpd) and Connectors
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: EAP 6.1.0
Assignee: Mladen Turk
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard: connectors eap6_need_triage mod_jk na...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-04 13:02 UTC by Jan Stefl
Modified: 2014-05-27 01:27 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
RHEL6 x86 (at minimum)
Last Closed: 2013-09-09 14:34:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
mod_jk.log (63.87 KB, text/x-log)
2012-09-13 12:49 UTC, Jakub Cechacek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP6-1260 0 Minor Closed JK Status Manager does not work 2018-06-29 19:35:18 UTC

Description Jan Stefl 2012-05-04 13:02:09 UTC
Affects: Release Notes
project_key: JBPAPP6

I have one Httpd instance balancing two EAP instance. I try to manipulate mod_jk settings via jkmanager API but it doesn't work.

I execute smth. like:
Setting sticky session
http://127.0.0.1:5080/jkmanager/?cmd=edit&mime=prop&w=router&sticky_session=1
http://127.0.0.1:5080/jkmanager/?cmd=update&mime=prop&w=router&sticky_session=1

Disabling the node worker1
http://127.0.0.1:5080/jkmanager/?cmd=edit&mime=prop&w=router&sw=worker1&vwa=1
http://127.0.0.1:5080/jkmanager/?cmd=update&mime=prop&w=router&sw=worker1&vwa=1

...

But new settings is not applied.

Either settings done through the web interface is not applied - http://127.0.0.1:5080/jkmanager.


Described features worked in EAP ER3.

Comment 1 Permaine Cheung 2012-05-04 13:28:33 UTC
Mladen, can you please take a look? Thanks!

Comment 2 Permaine Cheung 2012-05-04 13:29:14 UTC
Sorry, I meant to send this to Mladen.

Comment 3 Rajesh Rajasekaran 2012-05-04 15:10:57 UTC
Labels: Removed: connectors mod_jk native Added: connectors eap6_need_triage mod_jk native


Comment 4 Mladen Turk 2012-05-04 15:44:31 UTC
This works for me:
$ echo "GET /jkstatus/?cmd=update&from=show&w=loadbalancer&vlr=5&vlri=100&vlt=60&vlee=30&vlx=0&vls=on&vlm=0&vll=1&mime=txt" | nc 127.0.0.1 8008
Result: type=OK message="Action finished"

... and the status is updated.

It also works for any browser, but it doesn't with curl (or I didn't find correct parameters)
If you think this is a bug, file a ticket upstream in ASF buzgilla.



Comment 5 Mladen Turk 2012-05-04 15:57:46 UTC
OK, so it works with curl as well.
The trick is to use the:

$ curl -G -d "cmd=update&w=loadbalancer&vlr=3&vlri=100&vlt=60&vlee=30&vlx=0&vls=on&vlm=0&vll=1&mime=txt" 127.0.0.1:8008/jkstatus/?cmd=update
Result: type=OK message="Action finished"

So the option -G and -d must be used.
$ curl -G -d "cmd=dump&w=loadbalancer&mime=xml" 127.0.0.1:8008/jkstatus/


Comment 6 Mladen Turk 2012-05-05 14:11:53 UTC
Applied a patch that should fix those shared memory sync issues.
Please verify with the mod_jk.so from the latest build

RHEL-6:
https://brewweb.devel.redhat.com//buildinfo?buildID=213154
Windows:
https://brewweb.devel.redhat.com//buildinfo?buildID=213153
Solaris:
http://www.qa.jboss.com/xbuildroot/packages/mod_jk/1.2.35/3.sun10/

If OK, we'll rebuild jboss-eap-native-webserver-connectors packages


Comment 7 Jan Stefl 2012-05-07 12:41:59 UTC
I tried it, but it still does not work.

RHEL6 x86
worker.web_server=Apache/2.2.15 (Unix) DAV/2 mod_jk/1.2.35
worker.jk_version=mod_jk/1.2.35

Comment 8 Permaine Cheung 2012-05-07 13:13:14 UTC
Thanks Mladen for the RHEL 6 build, just a note that the RHEL-5 build (mod_jk-1.2.35-5.ep6.el5) has also been updated with the patch.
The next handoff is tomorrow, let's see if we can get this fixed for that. Thanks!


Comment 9 Mladen Turk 2012-05-07 15:34:24 UTC
OK, so the problem is the command usage.
The cmd=dump will show only the 'mod_jk.conf' data, not the data from shared memory.
It's usage is to monitor modifications of conf files.

To see the actual data use:
$ curl -G -d "cmd=update&mime=prop&w=router&vls=1" 127.0.0.1:5080/jkmanager/
...
$ curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/
...
>>> worker.router.sticky_session=True

...
So it works.


Comment 10 Jan Stefl 2012-05-08 11:21:50 UTC
Mladen,
Thank you.
I tested it and it really works.

Just to be sure I tried another command - disable node, but node is still up.

Disable worker1
$ curl -G -d "cmd=update&mime=prop&w=router&sw=worker1&vwa=1" 127.0.0.1:5080/jkmanager/
OR
$ curl -G -d "cmd=edit&mime=prop&w=router&sw=worker1&vwa=1" 127.0.0.1:5080/jkmanager/

...

To see state of actual nodes
$ curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep state

...

>> worker.worker1.state=OK/IDLE
>> worker.worker2.state=OK/IDLE


And true is that worker1 still serving.

I tried that on RHEL6x64 (dev57) with old version even new version of from brew:
01794da0e8b1dafd360054bedc4e69c8 mod_jk.so

Comment 11 Mladen Turk 2012-05-08 11:47:08 UTC
Hmm,
But sate show the connection state.
What's got changed is
worker.node1.activation=ACT
to
worker.node1.activation=DIS


Comment 12 Permaine Cheung 2012-05-08 12:43:24 UTC
jboss-eap6-compose-6.0.0-14.ep6.el6 built with the latest JK with this fixed. Will be part of ER7 handoff.

Comment 13 Anne-Louise Tangring 2012-05-08 15:21:49 UTC
Triaged by EAP PM team. Changing to Blocker for EAP 6

Comment 14 Shelly McGowan 2012-05-08 15:53:18 UTC
Will be Resolved in ER7.

Comment 15 Jan Stefl 2012-05-09 13:34:59 UTC
Mladen,
It works. 
I was binding on wrong address with one of the EAPs instances (shame on me).

Btw. I have noticed one thing. If I want modify some params with cmd "edit" the data are not saved, but with "update" it works correctly.
I would expect that "only one" difference between edit and update is that changes with update does not persist restart of httpd, correct?

Example of that:
curl -G -d "cmd=edit&mime=prop&w=router&sw=worker1&vact=50" 127.0.0.1:5080/jkmanager/
curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep connect_timeout
>> worker.worker1.connect_timeout=10000


curl -G -d "cmd=update&mime=prop&w=router&sw=worker1&vact=50" 127.0.0.1:5080/jkmanager/
curl -G -d "mime=prop" 127.0.0.1:5080/jkmanager/ | grep connect_timeout
>> worker.worker1.connect_timeout=50

Comment 16 Mladen Turk 2012-05-09 14:31:39 UTC
For command line tools zou should use 'update'
Edit command is (although name suggest it edits) for displaying edit page
and is used for web browsers.


Comment 17 Jan Stefl 2012-05-09 14:58:20 UTC
Ok, that makes sense. Thanks for the clearing this.

Comment 18 Jan Stefl 2012-05-09 14:59:03 UTC
Thank you all for collaboration.

Comment 19 Misty Stanley-Jones 2012-06-01 04:45:49 UTC
Reopening to set release note fields.

Comment 20 Misty Stanley-Jones 2012-06-01 04:47:59 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Added: Release Notes


Comment 21 Misty Stanley-Jones 2012-06-01 07:06:10 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: Apache <code>mod_jk</code> includes a status manager API. When operations were run with it, the changes were not applied. This occurred via the API and the JK Status Manager web interface. This was due to an error with shared memory synchronization. This error has been corrected, and the JK Manager works as expected.


Comment 22 Jakub Cechacek 2012-09-13 12:47:58 UTC
Issue appears once again in 6.0.0.GA (I'm editing affected version of this jira as well)

Comment 23 Jakub Cechacek 2012-09-13 12:49:45 UTC
Attachment: Added: mod_jk.log


Comment 24 Dana Mison 2012-10-16 05:21:34 UTC
Writer: Added: mistysj


Comment 25 Misty Stanley-Jones 2012-10-18 02:26:18 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue Added: Documented as Known Issue


Comment 26 Misty Stanley-Jones 2012-10-18 02:27:21 UTC
Release Notes Text: Removed: Apache <code>mod_jk</code> includes a status manager API. When operations were run with it, the changes were not applied. This occurred via the API and the JK Status Manager web interface. This was due to an error with shared memory synchronization. This error has been corrected, and the JK Manager works as expected. Added: Apache <code>mod_jk</code> includes a status manager API. When operations are run with it, the changes are not applied, whether initiated via the API or the JK Status Manager web interface. This is due to an error with shared memory synchronization. 


Comment 27 Dana Mison 2012-10-29 00:58:58 UTC
Release Notes Text: Removed: Apache <code>mod_jk</code> includes a status manager API. When operations are run with it, the changes are not applied, whether initiated via the API or the JK Status Manager web interface. This is due to an error with shared memory synchronization.  Added: Apache mod_jk includes a status manager API. When operations are run with it, the changes are not applied, whether initiated via the API or the JK Status Manager web interface. This is due to an error with shared memory synchronization. 


Comment 28 Jan Stefl 2012-10-31 14:16:42 UTC
I confirm, that problem still appears.

In details
 - enabling / disabling workers with mentioned URL or via web interface - WORKS
 - enabling / disabling of sticky session WORKS via URL (like jkmanager?cmd=update&mime=prop&w=router&vls=0|1) but doesn't via web interface. It is only possible to set sticky session but it is not possible disable it via web interface.

Is there any reason why we use mod_jk 1.2.36 since 1.2.37 is out?

Comment 29 Mladen Turk 2012-10-31 14:47:57 UTC
Our 1.2.36 is actually 1.2.37 (we have a patch that is basically a diff between 1.2.37 and 1.2.36)
It was part of JBPAPP-9164, but it doesn't solve all the issues, so this is left for upstream fix first.


Comment 30 Anne-Louise Tangring 2012-11-13 20:53:10 UTC
Release Notes Docs Status: Removed: Documented as Known Issue 
Writer: Removed: mistysj 
Release Notes Text: Removed: Apache mod_jk includes a status manager API. When operations are run with it, the changes are not applied, whether initiated via the API or the JK Status Manager web interface. This is due to an error with shared memory synchronization.  
Docs QE Status: Removed: NEW 


Comment 31 Jan Stefl 2012-12-05 11:45:04 UTC
Ok, accurate situation about mass nodes handling is:
 - enabling / disabling workers with mentioned URL or via web interface - WORKS on Windows and Solaris, but not on RHEL.

Comment 34 Jan Stefl 2013-05-06 14:50:04 UTC
This issue is still valid. 
I belive that is relevant to https://bugzilla.redhat.com/show_bug.cgi?id=900793

Problem described for EWS is present for EAP natives too.
The problem obviously emerged on RHEL until 6.1.0.ER5, now appears on Solaris too (when httpd distributed in EAP is used).

Comment 35 Jan Stefl 2013-05-07 06:52:38 UTC
Vaclav and Permaine,

We just discovered that there is following patch http://svn.apache.org/viewvc?view=revision&revision=1354021 for resolving this issue.

Could you please incorporate it to EAP6 ER7 build?

Comment 36 Jan Stefl 2013-05-07 06:54:12 UTC
Please check comment 35.

Comment 37 Vaclav Tunka 2013-05-09 13:18:32 UTC
ER7 natives were already staged and waited on hand-off to QE at that time. If there will be additional release, we could incorporate it.

Comment 38 Jan Stefl 2013-05-13 12:21:21 UTC
Thank you.

Verified with EAP 6.1.0.ER8 -> OK


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