Bug 1455102 - Error when trying to save agent:SNMP plugin configuration in RHQ UI
Summary: Error when trying to save agent:SNMP plugin configuration in RHQ UI
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1455091
TreeView+ depends on / blocked
 
Reported: 2017-05-24 09:37 UTC by bkramer
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description bkramer 2017-05-24 09:37:55 UTC
Description of problem:
Attempt to save change in the agent:SNMP plugin configuration fails with "Failed to save the settings" message in the UI. At the same time RHQ server.log file logs:

************************************
WARN  [org.rhq.coregui.server.gwt.PluginGWTServiceImpl] (http-0.0.0.0:7080-23) Sending exception to client: [1495522648837] : org.rhq.core.domain.plugin.PluginConfigurationRequiredException: Plugin [Alert:SNMP] could not be enabled, because some required configuration fields are not set.
	at org.rhq.enterprise.server.plugin.ServerPluginManagerBean.checkForRequiredConfiguration(ServerPluginManagerBean.java:278) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.enterprise.server.plugin.ServerPluginManagerBean.enableServerPlugins(ServerPluginManagerBean.java:245) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
...
	at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:156) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
...
	at org.rhq.enterprise.server.plugin.ServerPluginManagerLocal$$$view16.enableServerPlugins(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-7]
	at org.rhq.coregui.server.gwt.PluginGWTServiceImpl.updateServerPluginConfiguration(PluginGWTServiceImpl.java:416) [classes:]
...

************************************
My test showed that this happens only if we leave Transport defined as UDP and *ONLY* first time when the configuration is changed/saved. 


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

How reproducible:
Always

Steps to Reproduce:
1. Navigate to RHQ UI -> Administration -> Server Plugins -> Alert:SNMP -> Plugin Configuration
2. Default Transport is UDP. Make sure not to change this. 
3. Navigate to SNMP version1 properties and set Agent Address;
4. Click on "Save" button

Actual results:
"Failed to save the settings" error message is shown in the top right corner of the RHQ UI:

***********************************
Message :	
Failed to save the settings
Severity :	
Error
	
Time :	
Tuesday, May 23, 2017 10:31:09 AM UTC-5
Root Cause :	
[1495553469704] org.rhq.core.domain.plugin.PluginConfigurationRequiredException:Plugin [Alert:SNMP] could not be enabled, because some required configuration fields are not set.
Detail :	

java.lang.RuntimeException:[1495553469704] org.rhq.core.domain.plugin.PluginConfigurationRequiredException:Plugin [Alert:SNMP] could not be enabled, because some required configuration fields are not set.
--- STACK TRACE FOLLOWS ---
[1495553469704] org.rhq.core.domain.plugin.PluginConfigurationRequiredException:Plugin [Alert:SNMP] could not be enabled, because some required configuration fields are not set.
   at Unknown.RuntimeException_0(Unknown Source)
   at Unknown.instantiate_32(Unknown Source)
   at Unknown.$instantiate_0(Unknown Source)
   at Unknown.$instantiate(Unknown Source)
   at Unknown.$readObject(Unknown Source)
   at Unknown.$onResponseReceived(Unknown Source)
   at Unknown.onResponseReceived_4(Unknown Source)
   at Unknown.$fireOnResponseReceived(Unknown Source)
   at Unknown.onReadyStateChange_0(Unknown Source)
   at Unknown.$setOnReadyStateChange/this$static.onreadystatechange<(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.entry_0/<(Unknown Source)
   at Unknown.anonymous(Unknown Source)
***********************************
Even though the error is displayed, if I navigate to another page and then back to the Server Plugins > Alert:SNMP page the values are actually saved.

Expected results:

The values are properly saved and no error is logged/shown.

Additional info:

Previously logged the same error for JBoss ON: https://bugzilla.redhat.com/show_bug.cgi?id=1257741


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