Bug 534555 (RHQ-1340) - errors if actions execute against a plugin but the resource synchronization hasn't finished yet
Summary: errors if actions execute against a plugin but the resource synchronization h...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1340
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 1.1.2
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Rajan Timaniya
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-09 20:59 UTC by Joseph Marques
Modified: 2014-05-02 20:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-02 20:43:15 UTC
Embargoed:


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

Description Joseph Marques 2009-01-09 20:59:00 UTC
* 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 21:00:14 UTC
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 15:07:56 UTC
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 20:30:55 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1340


Comment 4 Corey Welton 2010-08-05 17:45:24 UTC
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 09:48:42 UTC
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 09:51:05 UTC
Created attachment 437086 [details]
server log


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