Bug 847674 - [as7] reload operation fails for standalone server - InvalidPluginConfigurationException
[as7] reload operation fails for standalone server - InvalidPluginConfigurati...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.4
Unspecified Unspecified
high Severity urgent (vote)
: ---
: RHQ 4.5.0
Assigned To: Stefan Negrea
Mike Foley
:
Depends On:
Blocks: as7-plugin 847869
  Show dependency treegraph
 
Reported: 2012-08-13 05:20 EDT by Libor Zoubek
Modified: 2015-11-01 19:43 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 847869 (view as bug list)
Environment:
Last Closed: 2013-09-01 06:00:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2012-08-13 05:20:59 EDT
Description of problem: When EAP server starts sending restart-required headers I am not able to reload it using UI.


Version-Release number of selected component (if applicable):
JON 3.1.1.ER1 + EAP6 GA

How reproducible:always


Steps to Reproduce:
1. Have EAP6 protected by user/pass running in standalone mode, imported with children => credentials are correct
2. make server require restart (for example by disabling ExampleDS datasource)
3. start 'reload' operation on server
  
Actual results: Reload operation fails with this.

org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Credentials for plugin to connect to AS7 management interface are invalid - update Connection Settings with valid credentials.
	at org.rhq.modules.plugins.jbossas7.ASConnection.handleAuthorizationFailureResponse(ASConnection.java:341)
	at org.rhq.modules.plugins.jbossas7.ASConnection.executeRaw(ASConnection.java:266)
	at org.rhq.modules.plugins.jbossas7.ASConnection.execute(ASConnection.java:433)
	at org.rhq.modules.plugins.jbossas7.ASConnection.execute(ASConnection.java:374)
	at org.rhq.modules.plugins.jbossas7.StandaloneASComponent.invokeOperation(StandaloneASComponent.java:100)
	at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)


Expected results:


Additional info: Disabling a datasource is not the only way how to reproduce this BZ. It is enough to repeatedly run 'reload' operation on server, it fails for me on the 2nd attempt with above error message.
Comment 1 Stefan Negrea 2012-08-13 17:04:05 EDT
The bug did not affect the restart operation itself. The plugin was not properly detecting when the server was up and operational after a successful restart. 

The code that was probing the server by sending an operation and looking for success or failure on the operation execution. If the server is not fully started, the operation execution could fail in surprising ways, thus throwing exceptions that bubbled up the stack. Updated the probing code to catch exceptions and just consider them failed attempts to connect to the server.
Comment 3 Libor Zoubek 2012-08-21 05:37:52 EDT
Hi Stefan, I was still able to reproduce this BZ on JON 3.1.1.ER2
Comment 4 Libor Zoubek 2012-08-21 05:39:42 EDT
please ignore my previous comment.
Comment 5 Stefan Negrea 2012-08-29 04:46:18 EDT
Updated all the wait methods for reload, shutdown, and restart to have the same design. All the methods now take into account possible exceptions for the test operation sent to the application server.

master branch commit:

http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=e6e91058f3ac76c6458847bd66a8ee5c9c24493e
Comment 6 Heiko W. Rupp 2013-09-01 06:00:50 EDT
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.

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