Bug 534361 (RHQ-1165) - Investigate agent subsystem start order and dependencies
Summary: Investigate agent subsystem start order and dependencies
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1165
Product: RHQ Project
Classification: Other
Component: Agent
Version: 1.2
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Sunil Kondkar
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-21 16:26 UTC by Heiko W. Rupp
Modified: 2014-05-02 20:30 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-02 20:30:43 UTC
Embargoed:


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

Description Heiko W. Rupp 2008-11-21 16:26:00 UTC
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 20:27:08 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1165


Comment 2 wes hayutin 2010-02-16 15:44:45 UTC
mass move off the qa triage list.  These are tasks for dev.

Comment 3 Corey Welton 2010-08-18 15:06:08 UTC
Moved to ONQA for further examination.  Heiko will provide repro steps.

Comment 4 Sunil Kondkar 2010-08-25 11:01:00 UTC
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 11:02:22 UTC
Created attachment 440886 [details]
server log


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