Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 730367 - JON 2.3/2.4 with Drools plugin cannot discover an application that uses Drools
Summary: JON 2.3/2.4 with Drools plugin cannot discover an application that uses Drools
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: JON
Version: BRMS 5.2.0-ER1
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: John Graham
QA Contact: Lukáš Petrovický
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-12 15:59 UTC by Pavel Kralik
Modified: 2013-04-30 23:33 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-05 06:54:26 UTC
Type: ---

Attachments (Terms of Use)
Logs for RHQ Server and Agent JON 2.4.1 and Drools Plugin (5.75 MB, application/x-tar)
2011-08-26 16:29 UTC, Pavel Kralik
no flags Details
JON 2.4.1 logs for the server/agent and Drools plugin (154.77 KB, application/x-gzip)
2011-08-31 13:32 UTC, Pavel Kralik
no flags Details

Description Pavel Kralik 2011-08-12 15:59:40 UTC
Description of problem:

I tried to discover and monitor a drools-jon-example application with JON 2.3/2.4 and a Drools plugin. Plugin was discovered by JON successfully and could be inspected in "Installed Plugins" in Administration tab. The drools application was not discovered by JON and its agent. 

Version-Release number of selected component (if applicable):

JON 2.3.1.GA/2.4.0.GA/2.4.1.GA

How reproducible:


Steps to Reproduce:
1. Install the JON server and copy the Drools plugin to jon-server-$VERSION.GA/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins directory.

2. Inspect if the plugin is in Installed Plugins in JON Administration tab.

3. Run a drools-jon-example application
   with ant compile; ant server; ant server.start;ant client.phase1; ant client.phase2

4. Try to inspect the Drools application with jconsole

5. Try to auto discover the application in JON Overview->Dashboard tab.
Actual results:

The Drools application is discovered by jconsole but not by JON auto discovery functionality.

Expected results:

The Drools application is discovered by jconsole and JON auto discovery functionality.

Additional info:

Comment 1 Len DiMaggio 2011-08-15 14:10:58 UTC

<ccrouch> does the instance get discovered using the regular JBAS plugin?

Is this a JBAS plugin problem or a drools plugin problem?

Pavel - can you retest with the JBAS plugin?

Comment 2 Lukáš Petrovický 2011-08-22 10:51:13 UTC
Please explain how this relates to JBAS in any way whatsoever. Drools has no relation to app server, it is a simple Java SE app.

Comment 3 Len DiMaggio 2011-08-22 18:27:08 UTC
Charles added:

'...so the problem is either in the Drools plugin, or in how it integrates with the JMX plugin, or in the JMX plugin itself...'

Can you re-run the test and:

1) turn jpda flags on in the agent

2) attach the JON agent and server logs

We can then ask the JON guys to look at this - Tom Cunningham has not seen these problems with JON 2.4.1

Comment 4 Pavel Kralik 2011-08-26 16:29:41 UTC
Created attachment 520118 [details]
Logs for RHQ Server and Agent JON 2.4.1 and Drools Plugin

Comment 5 Pavel Kralik 2011-08-26 16:33:23 UTC
I rerun the Drools application with JON 2.4.1/Drools plugin and the Agent in Debug mode.

Comment 6 Charles Crouch 2011-08-30 17:30:15 UTC
(12:18:59 PM) ccrouch: dsteigner: can you confirm what version information you get when you start up a JON2.4.1 agent
(12:24:21 PM) dsteigner: ccrouch, for 2.4.1 2011-08-30 12:23:16,218 INFO  [main] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.identify-version}Version=[RHQ 3.0.1.GA], Build Number=[81e26be20d], Build Date=[Feb 14, 2011 8:39 PM]
(12:25:48 PM) ccrouch: ldimaggi_:  as I mentioned to pkralik on thursday. I don't think he's testing with the version he thinks he is
(12:26:19 PM) ccrouch: as debbie confirmed above, testing with JON2.4.1 shows Version=[RHQ 3.0.1.GA] in the agent logs
(12:26:29 PM) ccrouch: the agent logs attached to this BZ show rhq4.0.0
(12:26:37 PM) ldimaggi_: ccrouch, oh! I didn't know that you had told him that - so - he;'s using an old JON release
(12:26:40 PM) ldimaggi_: by mistake
(12:26:57 PM) ccrouch: so my recommendation would be to go back to the folks that developed the plugin and see what versions they have tested and got it working with 
(12:27:15 PM) ccrouch: and then do a brand new install with that version and test that
(12:27:30 PM) ccrouch: ldimaggi_: no, he's using an RHQ release
(12:27:40 PM) ldimaggi_: ccrouch, well - we also want this to run with JON 2.4.1
(12:28:06 PM) ldimaggi_: ccrouch, RHQ?
(12:28:23 PM) ccrouch: well you should confirm with the developers that wrote it that it should work with that version of JON. I don't know of any reason it shouldn't
(12:28:35 PM) ccrouch: but the point remains pkralik is not testing with JON2.4.1
(12:28:48 PM) ldimaggi_: ccrouch, grazie!

Comment 7 Pavel Kralik 2011-08-31 13:32:37 UTC
Created attachment 520817 [details]
JON 2.4.1 logs for the server/agent and Drools plugin

Comment 8 Pavel Kralik 2011-08-31 13:34:35 UTC
I added logs for JON 2.4.1. The Drools example application is not discovered by JON again.

Comment 9 Edson Tirelli 2011-08-31 14:34:28 UTC
Hi all,

When I discussed this with JON developers, they told me that there is no option for the JMX plugin, as it is today, to discover JVMs that contain a specific MBean running. So in practice, there is no "auto-discovery of Drools applications".

What the user has to do is to discover JMX enabled JVMs and add a JMX server for that JVM. Drools services will be available under that JMX server. 

I don't have JON installed at the moment... will do it and post it here later.


Comment 10 Edson Tirelli 2011-08-31 15:46:26 UTC
Message sent to Lee as well:

   I installed JON here and tried it out. Step by step:

1. start JON server, agent and the Drools application
1.1. in the drools application remember to set the MBean options to enabled and to set the jmxremote port number in the JVM. 

2. login into the JON web console
3. click Inventory -> Discovery Queue
4. you should see the installed agent there. Expand the tree under the agent
5. select the process under the agent. Type is "JMX Server"
6. click import

   This is enough to start monitoring the drools application. To see the data:

7. click on servers
8. click on the JMX server you just imported
9. in the left tree, under JMX servers, you will see the process you just imported. Click on it.
10. click on Drools Services

   Hope this helps.

   Let me know if you need clarification in any of the steps.

Comment 11 Edson Tirelli 2011-09-02 15:29:53 UTC
Message sent to Pavel:

   I just tested JON 2.4.1 as we discussed over the IRC and it worked for me. Steps:

1. Downloaded JON server and agent from: http://porkchop.devel.redhat.com/released/JBossON/2.4.1/GA/
2. Downloaded Drools plugin from: http://jawa05.englab.brq.redhat.com/candidate/BRMS-5.2.0.ER3/jon/
3. Installed server, agent, and the plugin. 
4. Checked that the server is running, agent is running and plugin is installed.
5. Executed the drools application [see details bellow]
6. On the agent console, typed "discovery" command for the agent to find the drools application, which it found on port 19988.
7. On JON console, clicked on auto-discovery queue
8. Selected the JMX Server process that is showing there, running on port 19988.
9. Clicked import
10. Clicked on Resources->servers
11. Clicked on the JMX Server
12. Under JMXServer on the left hand side, you have Drools Service.

[DETAILS on running the Drools application]:

* JVM parameters to enable JMX remote and disable authentication for the demo:

-Dcom.sun.management.jmxremote.port=19988 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

* Make sure the drools application has MBeans enabled:

-Ddrools.mbeans = enabled

  Or you can use the API instead:

        KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
        conf.setOption( MBeansOption.ENABLED );

Comment 12 Pavel Kralik 2011-09-02 16:56:58 UTC
Incorporated JMX properties into into the drools-jon-example application Ant XML. JON 2.4.1 now discovers enabled JMX/Drools application.

Comment 13 Lukáš Petrovický 2011-09-05 06:54:26 UTC
Thanks for the info, everything's fine now. Closing as NOTABUG.

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