Bug 847674 - [as7] reload operation fails for standalone server - InvalidPluginConfigurationException
Summary: [as7] reload operation fails for standalone server - InvalidPluginConfigurati...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.4
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: RHQ 4.5.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: as7-plugin 847869
TreeView+ depends on / blocked
 
Reported: 2012-08-13 09:20 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 847869 (view as bug list)
Environment:
Last Closed: 2013-09-01 10:00:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Libor Zoubek 2012-08-13 09:20:59 UTC
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 21:04:05 UTC
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 09:37:52 UTC
Hi Stefan, I was still able to reproduce this BZ on JON 3.1.1.ER2

Comment 4 Libor Zoubek 2012-08-21 09:39:42 UTC
please ignore my previous comment.

Comment 5 Stefan Negrea 2012-08-29 08:46:18 UTC
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 10:00:50 UTC
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.