Bug 719731 - Runtime exception viewing Group Configuration
Runtime exception viewing Group Configuration
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
All All
high Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
Mike Foley
: 719999 (view as bug list)
Depends On:
Blocks: rhq41 rhq41-ui
  Show dependency treegraph
Reported: 2011-07-07 15:14 EDT by Mike Foley
Modified: 2012-02-07 14:31 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 14:31:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Foley 2011-07-07 15:14:40 EDT
Description of problem:  Runtime exception viewing Group Configuration

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

How reproducible:

Steps to Reproduce:
1.  Inventory-->All Groups--->New
2.  Create group named "test" with 1 resource, the RHQ Agent
3.  View group, Configuration Tab, Current Configuration
Actual results:
Globally uncaught exception

Expected results:
View Group Configuration without exception

Additional info:
Message :	
Globally uncaught exception
Severity :	
Time :	
Thursday, July 7, 2011 3:08:04 PM Etc/GMT+4
Detail :	
java.lang.RuntimeException:One or more null or empty member connection settings was returned by the Server.
One or more null or empty member connection settings was returned by the Server.
    at Unknown.java_lang_RuntimeException_$RuntimeException__Ljava_lang_RuntimeException_2Ljava_lang_String_2Ljava_lang_RuntimeException_2(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_detail_configuration_GroupResourceConfigurationEditView$3$1_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_groups_detail_configuration_GroupResourceConfigurationEditView$3$1_2Ljava_util_Map_2V(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_groups_detail_configuration_GroupResourceConfigurationEditView$3$1_onSuccess__Ljava_lang_Object_2V(Unknown source:0)
    at Unknown.com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
    at Unknown.org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V(Unknown source:0)
    at Unknown.com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V(Unknown source:0)
    at Unknown.com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
    at Unknown.handleEvent(Unknown source:0)
    at Unknown.SJOWContentBoundary(Unknown source:0)
    at Unknown.anonymous(Unknown source:0)
Comment 1 John Mazzitelli 2011-08-17 13:02:40 EDT
*** Bug 719999 has been marked as a duplicate of this bug. ***
Comment 2 John Mazzitelli 2011-08-17 13:24:24 EDT
side note: looks like copy-paste error with the message. this doesn't have to do with connection settings, its reosurce config. I'm gonna change the four places where that exception message was. For the two that involve resource configuration, it will say:

"The server did not return the configuration for one or more member resources."

For the two that involve connection properties (aka plugin configuration), it will say:

"The server did not return the connection settings for one or more member resources."
Comment 3 John Mazzitelli 2011-08-17 13:34:23 EDT
I see this in the server log, looks related:

13:28:15,437 ERROR [ConfigurationManagerBean] Current Configuration for Resource[id=10364, type=RHQ Agent, key=agent2 RHQ Agent, name=RHQ Agent, parent=agent2, version=4.1.0-SNAPSHOT] does not match latest associated ResourceConfigurationUpdate with SUCCESS status.

From the GWT error message and this log error message, it appears that the server is rejecting the live config because it doesn't match what's in our DB. Thus, it is probably not sending that to the client hence why the client is saying it didn't get one or more configs for a member resource
Comment 4 John Mazzitelli 2011-08-17 13:58:11 EDT
Here is the relevant code in ConfigurationManagerBean. We check to see if the live configs match the latest SUCCESS configs - if they don't, we persist them into the audit history and use it. For some reason, persistNewAgentReportedResourceConfiguration is returning null:

        // If we got this far, we were able to retrieve all of the live configs from the Agents. Now load the current
        // persisted configs from the DB and compare them to the corresponding live configs. For any that are not equal,
        // persist the live config to the DB as the new current config.
        Map<Integer, Configuration> currentPersistedConfigs = getPersistedResourceConfigurationsForCompatibleGroup(group);
        for (Resource memberResource : groupMembers) {
            Configuration liveConfig = liveConfigs.get(memberResource.getId());
            // NOTE: The persisted config may be null if no config has been persisted yet.
            Configuration currentPersistedConfig = currentPersistedConfigs.get(memberResource.getId());
            if (!liveConfig.equals(currentPersistedConfig)) {
                // If the live config is different than the persisted config, persist it as the new current config.
                ResourceConfigurationUpdate update = persistNewAgentReportedResourceConfiguration(memberResource,
                if (update != null)
                    currentPersistedConfigs.put(memberResource.getId(), update.getConfiguration());
                    log.error("Current Configuration for " + memberResource
                        + " does not match latest associated ResourceConfigurationUpdate with SUCCESS status.");
Comment 5 John Mazzitelli 2011-08-17 14:50:47 EDT
I think the problem is that the return value of persistNewAgentReportedResourceConfiguration was not properly understood. If it returns null, it means the live config is the same as the persisted config. But that null value was ignored and we never even stored the live config in the returned map.
Comment 6 John Mazzitelli 2011-08-17 15:50:58 EDT
master commit a7d37237828a22d5ab19cc4ec63f28a5f9ef0083
Comment 7 Sunil Kondkar 2011-08-18 07:19:27 EDT
Verified on build#298 (Version: 4.1.0-SNAPSHOT Build Number: 66918cb)

Created a compatible group of one RHQ Agent. Navigated to the configuration tab of the resource. The configuration details are displayed and no exception is observed. Also verified with adding one more RHQ Agent resource of another platform to the compatible group and navigating to the configuration tab of the group.

Marking as verified.
Comment 8 Mike Foley 2012-02-07 14:31:20 EST
Comment 9 Mike Foley 2012-02-07 14:31:20 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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