Bug 534555 - (RHQ-1340) errors if actions execute against a plugin but the resource synchronization hasn't finished yet
errors if actions execute against a plugin but the resource synchronization h...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
1.1.2
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Rajan Timaniya
http://jira.rhq-project.org/browse/RH...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-09 15:59 EST by Joseph Marques
Modified: 2014-05-02 16:43 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-02 16:43:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
server log (398.45 KB, text/x-log)
2010-08-06 05:51 EDT, Rajan Timaniya
no flags Details

  None (edit)
Description Joseph Marques 2009-01-09 15:59:00 EST
* startup a server with an existing inventory
* stop your agent
* go to the operations tab of some service, say a datasource
* start your agent with "--clean" (this will force a full resource synchronization to happen)
* execute the flush operation on the datasource
* you will get the following failure

org.rhq.core.clientapi.agent.PluginContainerException: Failed to submit invocation request. resource=[500073], operation=[flush], jobId=[rhq-resource-500073-97532676-1231534302698_=_rhq-resource-500073_=_1231534302886]
	at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:154)
	at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:110)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
	at $Proxy2.execute(Unknown Source)
	at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:290)
	at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:184)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560)
	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369)
	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
Caused by: org.rhq.core.clientapi.agent.PluginContainerException: [Warning] Resource component container could not be retrieved for resource: 500073
	... 26 more

i think what should happen is that if the agent-side resource hierarchy is still being synch'ed, the agent should suspending server-initiated actions (operation execution being just one of them) until it completes.
Comment 1 Joseph Marques 2009-01-09 16:00:14 EST
btw, for this test, if you let 30 seconds pass and then execute the operation, it will succeed.
Comment 2 John Mazzitelli 2009-01-26 10:07:56 EST
I don't think we can get around this. The agent core manages the comm link - you can have the agent up but its internal plugin container shutdown (in fact, there is even a prompt command that you can use to shutdown and restart the PC separately from the agent and its comm layer).

If the PC is down for whatever reason (or if the PC is in the process of starting), you'll get this error.

BTW: the PC shutting down also happens when the agent is updating plugins - so if the agent is told to update its plugins, you won't be able to execute operations either.
Comment 3 Red Hat Bugzilla 2009-11-10 15:30:55 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1340
Comment 4 Corey Welton 2010-08-05 13:45:24 EDT
Moving this old bug to ON_QA to see if it still exists.  Close if no longer an issue, reopen if issue still exists.

If this bug is lacking repro steps, please contact joseph.
Comment 5 Rajan Timaniya 2010-08-06 05:48:42 EDT
Tested on JON2.4 GA with Postgres 8.4

Steps:
1) startup a server with an existing inventory
2) stop your agent
3) go to the operations tab of some service, say a datasource
4) start your agent with "--clean" (this will force a full resource
synchronization to happen)
5) execute the flush operation on the datasource

Observation: Found the error in server log - Failed to submit
invocation request.

2010-08-06 15:13:57,128 INFO  [org.rhq.enterprise.server.core.CoreServerServiceImpl] Agent [10.65.193.1] has connected to this server at Fri Aug 06 15:13:57 IST 2010
2010-08-06 15:14:14,652 ERROR [org.rhq.enterprise.server.operation.ResourceOperationJob] Failed to execute scheduled operation [ResourceOperationSchedule: resource=[Resource[id=10029, type=Datasource, key=jboss.jca:name=NoTxRHQDS,service=DataSourceBinding, name=NoTxRHQDS]],job-name=[rhq-resource-10029-97532676-1281087854269], job-group=[rhq-resource-10029], operation-name=[flush], subject=[org.rhq.core.domain.auth.Subject[id=2,name=rhqadmin]], description=[]]
org.rhq.core.clientapi.agent.PluginContainerException: Failed to submit invocation request. resource=[10029], operation=[flush], jobId=[rhq-resource-10029-97532676-1281087854269_=_rhq-resource-10029_=_1281087854384]
        at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:156)
        at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:110)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
        at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
        at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
        at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
        at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
        at $Proxy0.execute(Unknown Source)
        at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:290)
        at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:184)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
        at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
        at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
        at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
Caused by: org.rhq.core.clientapi.agent.PluginContainerException: [Warning] Resource component container could not be retrieved for resource: 10029
        ... 26 more
Comment 6 Rajan Timaniya 2010-08-06 05:51:05 EDT
Created attachment 437086 [details]
server log

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