Bug 534361 - (RHQ-1165) Investigate agent subsystem start order and dependencies
Investigate agent subsystem start order and dependencies
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
1.2
All All
high Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Sunil Kondkar
http://jira.rhq-project.org/browse/RH...
: FutureFeature, Task
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-21 11:26 EST by Heiko W. Rupp
Modified: 2014-05-02 16:30 EDT (History)
2 users (show)

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


Attachments (Terms of Use)
server log (638.64 KB, text/x-log)
2010-08-25 07:02 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Heiko W. Rupp 2008-11-21 11:26:00 EST
When an agent connects with an outdated inventory (e.g. a resource got deleted while the agent was offline),
the server will spit messages like the one below.
From the serve pov this is correct, but still annoying and also irritating to the user.

We should perhaps when starting the agent first sync the inventory. THen for all no-longer existing resource purge any data that might be lying around for them (measurements, ops results, ...) and only then start the components and all those threads that do useful things.

17:18:29,257 INFO  [DiscoveryServerServiceImpl] Error processing availability report from [snert]: java.lang.RuntimeException:javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.transaction.RollbackException:[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update -> org.hibernate.exception.ConstraintViolationException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch-Eintrag 20 insert into RHQ_AVAILABILITY (START_TIME, END_TIME, AVAILABILITY_TYPE, RESOURCE_ID, ID) values (1227284304018, NULL, 1, 500058, 502095) wurde abgebrochen.  Rufen Sie 'getNextException' auf, um die Ursache zu erfahren.[SQLException=Batch-Eintrag 20 insert into RHQ_AVAILABILITY (START_TIME, END_TIME, AVAILABILITY_TYPE, RESOURCE_ID, ID) values (1227284304018, NULL, 1, 500058, 502095) wurde abgebrochen.  Rufen Sie 'getNextException' auf, um die Ursache zu erfahren. -> ERROR: insert or update on table "rhq_availability" violates foreign key constraint "rhq_availability_resource_id_fkey"
  Detail: Key (resource_id)=(500058) is not present in table "rhq_resource".(error-code=0,sql-state=23503)]
Comment 1 Red Hat Bugzilla 2009-11-10 15:27:08 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1165
Comment 2 wes hayutin 2010-02-16 10:44:45 EST
mass move off the qa triage list.  These are tasks for dev.
Comment 3 Corey Welton 2010-08-18 11:06:08 EDT
Moved to ONQA for further examination.  Heiko will provide repro steps.
Comment 4 Sunil Kondkar 2010-08-25 07:01:00 EDT
Tested on jon-2.4.0.GA

Stopped the agent and uninventoried resource 'postgres'. Again started the agent and observed the server logs. The exception is not occurred in server log

However, again stopped the agent, uninventoried resource 'JBossAS Server' (jboss-eap-5.0). Again started the agent and observed the server logs. Below exception is observed in server log.

2010-08-25 15:37:53,189 INFO  [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Error processing availability report from [sunillaptop]: javax.ejb.EJBException:java.lang.NullPointerException -> java.lang.NullPointerException:null

Please find attached the server log.
Comment 5 Sunil Kondkar 2010-08-25 07:02:22 EDT
Created attachment 440886 [details]
server log

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