Bug 773661

Summary: AS / JMX plugin should warn users or display an error when it cannot connect to the JMX server
Product: [Other] RHQ Project Reporter: claprun <claprun>
Component: PluginsAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: high    
Version: 4.2CC: hrupp, lkrejci, skondkar, spinder, theute
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 773669 790048 (view as bug list) Environment:
Last Closed: 2013-09-03 15:03:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 773669, 782579, 790048    

Description claprun@redhat.com 2012-01-12 14:15:02 UTC
By default, the JMX console in EAP is secured. Due to this, the AS 5 plugin is not able to connect to the JMX server to retrieve the information it needs. However, it fails silently reporting that the otherwise smoothly running instance is unavailable instead of showing a plugin error.
The plugin should display an error to the user when it cannot connect to the JMX server instead of silently failing.

Comment 1 Charles Crouch 2012-01-18 17:03:16 UTC
We should already be doing this, first thing is to reliably reproduce the issue

Comment 2 claprun@redhat.com 2012-01-19 10:09:59 UTC
Reproducing the issue should be easy: just enable the AS 5 plugin (which really should be renamed to EAP 5 since that's really the only thing it can deal with) and try to monitor a default EAP instance (i.e. one that has been installed and not modified from the zip file).

Comment 4 Lukas Krejci 2012-02-03 12:25:00 UTC
To test this inventory a secured EAP without providing credentials. A resource error should appear in the resource detail page (the yellow warning triangle next to the availability icon in the top-right corner of the resource detail page). When clicked, one of the resource errors should be an INVALID_PLUGIN_CONFIGURATION error with a detailed stacktrace containing the cause of the error.

The resource error should also appear when providing invalid (as opposed to none) credentials.

master: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=3ac2a05f042d3137bb0003a086d0e69556e3bea5
Author: Lukas Krejci <lkrejci>
Date:   Thu Feb 2 20:35:11 2012 +0100

    [BZ 773661] - Invalid plugin configuration errors are now reported also
    during the InventoryManager start up.

master: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=9e6d06064faf01d9380fad64c91525e7b228c3bf
Author: Lukas Krejci <lkrejci>
Date:   Fri Feb 3 13:15:05 2012 +0100

    [BZ 773661] - The security exception is thrown directly if the principal is
    null but wrapped in another exception if the principal is non-null.
    Report both instances as InvalidPluginConfigurationExceptions while
    connecting to profile service.

master: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=e732f44351125a591582dbd2ee59f983eb7eb300
Author: Lukas Krejci <lkrejci>
Date:   Fri Feb 3 13:13:18 2012 +0100

    [BZ 773661] - Reporting invalid plugin configuration if the resource starts
    failing startup after upgrade and after manual add of a resource.

Comment 6 Simeon Pinder 2012-02-09 18:58:44 UTC
Moving this to ON_QA as new RC3 binary available here:
https://brewweb.devel.redhat.com//buildinfo?buildID=198086

Comment 7 Sunil Kondkar 2012-02-10 10:29:21 UTC
Verified on Version: 3.0.1.GA RC3 build. (Build Number: dd8a001:0ba18fd)


Inventoried EAP without providing credentials. A resource error appeared in the resource detail page. When clicked, it displayed INVALID_PLUGIN_CONFIGURATION error with a detailed stacktrace.

Also verified that when invalid credentials are provided, a resource error with INVALID_PLUGIN_CONFIGURATION error is displayed in the resource detail page. the agent log displays below:

2012-02-10 15:15:31,499 WARN  [ResourceContainer.invoker.daemon-29] (org.rhq.plugins.jbossas5.ApplicationServerComponent)- Failed to connect to Profile Service - cause: java.lang.SecurityException: Authentication exception, principal=jadfdwe
2012-02-10 15:15:31,500 INFO  [WorkerThread#0[10.65.201.124:15084]] (rhq.core.pc.inventory.InventoryManager)- Unable to connect to managed resource of type [JBossAS Server] using the specified connection properties.
org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to start component for resource Resource[id=10571, type=JBossAS Server, key=/install/eap/eap5.1.1/new/jboss-eap-5.1/jboss-as/server/default, name=EAP localhost.localdomain:1099 default, parent=suniltest, version=EAP 5.1.1].

Comment 8 Charles Crouch 2012-02-13 14:55:28 UTC
This was verified in JON3.0.1 so setting Target Release appropriately

Comment 10 Heiko W. Rupp 2013-09-03 15:03:22 UTC
Bulk closing of old issues in VERIFIED state.