Bug 1455091 - Error when trying to save agent:SNMP plugin configuration UI
Summary: Error when trying to save agent:SNMP plugin configuration UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: UI
Version: JON 3.3.7,JON 3.3.8
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: CR02
: JON 3.3.9
Assignee: Josejulio Martínez
QA Contact: Hayk Hovsepyan
URL:
Whiteboard:
Depends On: 1455102
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-24 09:12 UTC by bkramer
Modified: 2020-07-16 09:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-02 17:22:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1257741 0 high CLOSED First attempt of saving SNMP alert configurations is failed if UDP transport protocol is used 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 1975513 0 None None None 2017-09-28 19:45:02 UTC
Red Hat Product Errata RHEA-2017:2846 0 normal SHIPPED_LIVE Red Hat JBoss Operations Network 3.3.9 bug fix update 2017-10-02 21:21:28 UTC

Internal Links: 1257741

Description bkramer 2017-05-24 09:12:58 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 JBoss ON 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):
JBoss ON 3.3.7, 3.3.8

How reproducible:
Always

Steps to Reproduce:
1. Navigate to JBoss ON 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 JBoss ON 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:
Originally, this issue was raised in the Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1257741 and it was supposed to be fixed in 3.3.6. However, both 3.3.7 and 3.3.8 are affected.

Comment 5 Simeon Pinder 2017-09-01 15:34:22 UTC
Moving to ON_QA as available for test with the following binary:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/133/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip

*NOTE Build represents JON 3.3.9 DR01 build.

Please report issues as you encounter them.

Comment 13 Simeon Pinder 2017-09-19 11:33:24 UTC
Moving to ON_QA.

JON 3.3.9 CR01 artifacts are available for test from here:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/135/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip
 *Note: jon-server-patch-3.3.0.GA.zip maps to CR01 build of
 jon-server-3.3.0.GA-update-09.zip.

Comment 14 Hayk Hovsepyan 2017-09-21 07:51:26 UTC
Tested on
Version : 3.3.0.GA Update 09
Build Number :    44ba698:204e925

When entering Alert:SNMP for the first time on fresh installed server.
Several problems were found.

1. Transport radio button is unset, no value is selected, Save button is disabled.

2. Without changing any default values, entering first time.
Check UDP for Transport.
Set Agent Address value in SNMP version 1 properties section.
Click Reset button. It will uncheck Transport, no value is checked. It removed value for Agent Address.
Again check UDP for Transport.
Try to set Agent Address value. Input field is disabled, Globally uncaught exception is shown. (attached)

3. Without changing any default values, entering first time.
Select UDP, click Save, saves successfully. No error in server logs.
Click RESET will reset Transport and unselect radio buttons.

4. After step 3 when UDP is selected and saved. Refresh the page, Transport is set UDP. 
Select TCP, click Save and it saves successfully
Then click RESET, it resets back to UDP.

Comment 15 Josejulio Martínez 2017-09-22 15:07:11 UTC
commit 351b56e067cb947a20c249ad61133b3cf624417a
Merge: d166765 46fdfaa
Author: Michael Burman <yak>
Date:   Fri Sep 22 09:47:14 2017 +0300

    Merge pull request #329 from josejulio/bugs/1455091
    
    Bug 1455091 - Uses configuration being sent instead of fetching

commit 46fdfaabc3da6dd2ec4bbdfbb662dee56aafc9ff
Author: Josejulio Martínez <jmartine>
Date:   Thu Sep 21 23:23:13 2017 -0500

    Bug 1455091 - Uses configuration being sent instead of fetching

Comment 18 Hayk Hovsepyan 2017-09-25 08:09:49 UTC
Verified on 
Version 3.3.0.GA Update 09
Build Number fcb34f1:80f74f5

When entering Alert:SNMP for the first time on fresh installed server:
Transport by default is UDP.
When changing Transport value and setting "Agent Address", Save finishes successfully.
Tried to change Transport and "Agent Address" several times, Save always finished successfully.

Comment 19 errata-xmlrpc 2017-10-02 17:22:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2846


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