Bug 1116931

Summary: cannot monitor RHQ Server services due to classloader issue
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: PluginsAssignee: Thomas Segismont <tsegismo>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.12CC: hrupp, jshaughn, tsegismo
Target Milestone: ---   
Target Release: RHQ 4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-15 11:35:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Mazzitelli 2014-07-07 15:53:51 UTC
Import RHQ Server into inventory and notice the child resource "RHQ Server Subsystems" is DOWN.

ERROR [Remoting "endpoint" read-1] (org.xnio.listener)- A channel event listener threw an exception java.lang.NoClassDefFoundError: Could not initialize class org.jboss.sasl.digest.DigestMD5Client
   at org.jboss.sasl.digest.DigestMD5ClientFactory.createSaslClient(DigestMD5ClientFactory.java:41)
   at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities$1.run(ClientConnectionOpenListener.java:428)

According to tsegismont, we need to fix:

 org.rhq.plugins.server.JBossAS7JMXDiscoveryComponent

Comment 1 John Mazzitelli 2014-07-07 15:54:11 UTC
see https://community.jboss.org/message/875127#875127 for background

Comment 2 Thomas Segismont 2014-07-07 16:10:47 UTC
Does not apply to 4.11, only 4.12-SNAPSHOT

Comment 3 John Mazzitelli 2014-07-07 17:16:43 UTC
https://github.com/rhq-project/rhq/pull/74

Comment 4 Thomas Segismont 2014-07-08 11:07:38 UTC
I've just updated the pull request, it was a "stupid" line forgotten: it's one thing to define a connection type class with "jboss-client.jar" as additional classpath entry, but it's inoperative until you tell EMS where to look from (library URI).

There's one last thing to tackle before closing the PR: the "RHQ Server Plugin Subsystem" service does not show up. The reason is the lookup name is wrong:

      <plugin-configuration>
        <c:simple-property
          name="objectName"
          default="rhq.serverplugin:service=ServerPluginService"
          readOnly="true" />

but 

public interface ServerPluginServiceMBean {
    String OBJECT_NAME_STR = "rhq:service=ServerPluginService";

It was changed by this commit from Jay:
https://github.com/rhq-project/rhq/commit/e821bedb1222fccc5e5b65003136a0923cee9710

What should we do? Update the plugin descriptor or change the MBean name?

Comment 5 John Mazzitelli 2014-07-08 13:24:55 UTC
(In reply to Thomas Segismont from comment #4)
> There's one last thing to tackle before closing the PR: the "RHQ Server
> Plugin Subsystem" service does not show up. The reason is the lookup name is
> wrong:
> ... 
> What should we do? Update the plugin descriptor or change the MBean name?

I dont know why it was changed - I put all the MBean services together grouped by functionality in their own domain names (hence why this is rhq.serverplugins... How long has it been changed? I would change it back the way it was just to maintain consistency with prior versions unless its been like this for a long time, if so, then change the descriptor.

Comment 6 Thomas Segismont 2014-07-08 13:33:44 UTC
> I dont know why it was changed - I put all the MBean services together
> grouped by functionality in their own domain names (hence why this is
> rhq.serverplugins... How long has it been changed? I would change it back
> the way it was just to maintain consistency with prior versions unless its
> been like this for a long time, if so, then change the descriptor.

It's in RHQ since 4.6. Commit authored on Sep,12 2012

Comment 7 Thomas Segismont 2014-07-08 15:49:41 UTC
Fixed in master

commit 838707cfe106fac768adf8a1d83a6806baf41440
Author: Thomas Segismont <tsegismo>
Date:   Mon Jul 7 19:08:14 2014 +0200
    
Use isolated classloader

Comment 8 Heiko W. Rupp 2014-12-15 11:35:53 UTC
Bulk close of items fixed in RHQ 4.12

If you think this is not solved, then please open a *new* BZ and link to this one.