Bug 608597
Summary: | Agent can not sync to server : PersistentMap not found | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Heiko W. Rupp <hrupp> |
Component: | Communications Subsystem | Assignee: | RHQ Project Maintainer <rhq-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> |
Severity: | high | Docs Contact: | |
Priority: | urgent | ||
Version: | 3.0.0 | CC: | mazz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | 2.4 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-08-12 16:48:38 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Heiko W. Rupp
2010-06-28 09:07:53 UTC
This PeristentMap is indirectly coming from Configuration.class Agent log (notice the 'unknown resource' ) 2010-06-28 16:26:37,764 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Syncing local inventory with Server invento ry... 2010-06-28 16:26:37,765 INFO [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Got unknown resource: 10001 2010-06-28 16:26:43,078 WARN [ClientCommandSenderTask Timer Thread #0] (org.rhq.enterprise.agent.FailoverFailureCallback)- {AgentMain.too-many-fa ilover-attempts}Too many failover attempts have been made [1]. Exception that triggered the failover: [org.jboss.remoting.CannotConnectException: Can not connect http client invoker. org.hibernate.collection.PersistentMap. Response: OK/200.] 2010-06-28 16:26:43,079 ERROR [InventoryManager.discovery-1] (enterprise.communications.command.client.ClientCommandSenderTask)- {ClientCommandSen derTask.send-failed}Failed to send command [Command: type=[remotepojo]; cmd-in-response=[false]; config=[{rhq.agent-name=snert, rhq.externalizable -strategy=AGENT, rhq.security-token=ioMuLI52d3baqlwmr8NJRg79Lu9K8Ih1SusXw5ALcERHCCVDMgEcOZrkhxBW0flPSJs=, rhq.send-throttle=true}]; params=[{invoc ation=NameBasedInvocation[getResources], targetInterfaceName=org.rhq.core.clientapi.server.discovery.DiscoveryServerService}]]. Cause: org.jboss.r emoting.CannotConnectException:Can not connect http client invoker. org.hibernate.collection.PersistentMap. Response: OK/200. -> java.lang.ClassNo tFoundException:org.hibernate.collection.PersistentMap. Cause: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. org .hibernate.collection.PersistentMap. Response: OK/200. 2010-06-28 16:26:43,079 WARN [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failed to synchronize local inventory with Server inventory for Resource [10001] and its descendants: Can not connect http client invoker. org.hibernate.collection.PersistentMap. Response: OK/200. 2010-06-28 16:26:43,079 ERROR [InventoryManager.discovery-1] (rhq.core.pc.inventory.RuntimeDiscoveryExecutor)- Error running runtime report java.lang.RuntimeException: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. org.hibernate.collection.PersistentMap . Response: OK/200. at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:944) at org.rhq.core.pc.inventory.InventoryManager.handleReport(InventoryManager.java:891) at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.call(RuntimeDiscoveryExecutor.java:119) at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.run(RuntimeDiscoveryExecutor.java:87) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) Same time server log 2010-06-28 16:26:34,298 INFO [org.rhq.enterprise.server.core.CoreServerServiceImpl] Agent [snert] has connected to this server at Mon Jun 28 16:26:34 CEST 2010 2010-06-28 16:26:34,298 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.complete}<<=CoreServerService.connectAgent|?|success 2010-06-28 16:26:34,303 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.initiate}<==DiscoveryServerService.getResources|? 2010-06-28 16:26:36,055 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.complete}<<=DiscoveryServerService.getResources|?|success 2010-06-28 16:26:37,408 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.initiate}<==DiscoveryServerService.mergeInventoryReport|? 2010-06-28 16:26:37,738 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.complete}<<=DiscoveryServerService.mergeInventoryReport|?|success 2010-06-28 16:26:37,767 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.initiate}<==DiscoveryServerService.getResources|? 2010-06-28 16:26:39,682 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.complete}<<=DiscoveryServerService.getResources|?|success 2010-06-28 16:26:40,449 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.initiate}<==DiscoveryServerService.getResources|? 2010-06-28 16:26:42,257 TRACE [org.rhq.enterprise.communications.command.server.IncomingCommandTrace] {recv.complete}<<=DiscoveryServerService.getResources|?|success pilhuhn: and this calls org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl#convertToPojoResource [16:31] pilhuhn: and then pojoResource.setPluginConfiguration(resource.getPluginConfiguration()); [16:32] pilhuhn: after this the pojoResource contains Javassist proxies - which may end up as those hibernate Map looks like DiscoveryServerServiceImpl doesn't take a deep copy of the plugin configuration. here's a potential patch: @@ -31,2 +31,3 @@ import org.rhq.core.clientapi.server.discovery.InventoryReport; import org.rhq.core.domain.auth.Subject; +import org.rhq.core.domain.configuration.Configuration; import org.rhq.core.domain.discovery.AvailabilityReport; @@ -185,3 +186,7 @@ public class DiscoveryServerServiceImpl implements DiscoveryServerService { pojoResource.setInventoryStatus(resource.getInventoryStatus()); - pojoResource.setPluginConfiguration(resource.getPluginConfiguration()); + Configuration pcCopy = resource.getPluginConfiguration(); + if (pcCopy != null) { + pcCopy = pcCopy.deepCopy(); + } + pojoResource.setPluginConfiguration(pcCopy); pojoResource.setName(resource.getName()); Just for completeness: Inventory on agent when this error happens:
> inventory
+ Resource[id=0, type=Mac OS X, key=snert, name=snert, parent=<null>, version=MacOSX 10.6.4] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=File Template Bundle Handler Server, key=file-template-bundle, name=File Template Bundle Handler, parent=snert, version=3.0.0-SNAPSHOT] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=JBossAS Server, key=/im/dev-container/jbossas/server/default, name=snert RHQ Server, parent=snert, version=4.2.3.GA] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=RHQ Agent, key=RHQ Agent, name=RHQ Agent, parent=snert, version=3.0.0-SNAPSHOT] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=Ant Bundle Handler Server, key=ant-bundle, name=Ant Bundle Handler, parent=snert, version=3.0.0-SNAPSHOT] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=server-d, key=server-d-0, name=server-d-0, parent=snert, version=1.0] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
+ Resource[id=0, type=Postfix Server, key=/etc/postfix/main.cf, name=snert, parent=snert] (sync=NEW, state=STOPPED, avail=UNKNOWN, sched=0/0)
Total Resources: 7 (1 Platforms, 6 Servers, 0 Services)
commited to release-3.0.0 branch: 358f16a670cdba71c5fa222ee2df72d7aa252a71 I have no idea how to test this. No replication procedures that I know of. QA Closing - I have not been seeing these messages in the latest build with either "old" or --clean agents. Mass-closure of verified bugs against JON. |