History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-322
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed Indirectly
Priority: Critical Critical
Assignee: Jay Shaughnessy
Reporter: Heiko W. Rupp
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

Error after import of a JBossAS 4.0.5

Created: 17/Apr/08 05:04 AM   Updated: 06/Oct/08 08:08 PM
Component/s: FX - Inventory, Core Server
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

Environment: Trunk as of this morning after the RHQ-297 fixes
Issue Links:
Relation
 

Resolution Date: 01/Oct/08 10:41 AM
Date of First Response: 17/Apr/08 05:47 AM
Tester: Jeff Weiss
VCS Revision: 1,656


 Description  « Hide
I was taking a JBossAS 4.0.5 in inventory


See the "problem creating schedules for resourceId = 500141" below - 500141 is the AS itself.
But then, it is collecting metrics and has schedules installed when I go to the configure subtab.



11:54:27,414 INFO [DiscoveryBossBean] Received inventory report from RHQ Agent [Agent[id=500050,name=172.31.7.7,address=172.31.7.7,port=16163,remote-endpoint=socket://172.31.7.7:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=2008-04-17 11:54:15.445]]. Number of added roots: 1
11:54:27,719 INFO [DiscoveryBossBean] Inventory merge complete for [1] Resources in [309]ms
11:54:27,734 INFO [DiscoveryServerServiceImpl] Performance: inventory merge of [1] resource in (327)ms
11:54:29,312 INFO [DiscoveryServerServiceImpl] Processed AV:[172.31.7.7][266][full] - need full=[false] in (532)ms
11:54:38,486 INFO [DiscoveryBossBean] Received inventory report from RHQ Agent [Agent[id=500050,name=172.31.7.7,address=172.31.7.7,port=16163,remote-endpoint=socket://172.31.7.7:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=2008-04-17 11:54:28.799]]. Number of added roots: 1
11:54:39,138 INFO [DiscoveryBossBean] Inventory status set to [COMMITTED] for [1] platforms and [1] servers in [143]ms
11:54:40,936 INFO [DiscoveryBossBean] Inventory merge complete for [268] Resources in [2455]ms
11:54:40,942 INFO [DiscoveryServerServiceImpl] Performance: inventory merge of [268] resource in (2463)ms
11:54:44,938 INFO [DiscoveryServerServiceImpl] Processed AV:[172.31.7.7][268][full] - need full=[false] in (334)ms
11:54:49,679 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 23505
11:54:49,680 ERROR [JDBCExceptionReporter] ERROR: duplicate key value violates unique constraint "rhq_meas_sched_uniq"
11:54:49,704 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
11:54:49,704 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e0f8f9:f559:480710b4:3b55 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e0f8f9:f559:480710b4:3b55 status: ActionStatus.ABORT_ONLY >)
11:54:49,707 WARN [MeasurementScheduleManagerBean] problem creating schedules for resourceId = 500141
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
        at org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean.getSchedulesForResourceAndItsDescendants(MeasurementScheduleManagerBean.java:891)
        at org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean.getSchedulesForResourceAndItsDescendants(MeasurementScheduleManagerBean.java:131)
        at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
        at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
        at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:153)
        at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
        at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
        at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
        at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:184)
        at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:81)
        at $Proxy263.getSchedulesForResourceAndItsDescendants(Unknown Source)
        at org.rhq.enterprise.server.measurement.MeasurementServerServiceImpl.getLatestSchedulesForResourceId(MeasurementServerServiceImpl.java:59)
        at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)
        at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
        at $Proxy370.execute(Unknown Source)
        at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:335)
        at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:230)
        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
        at org.jboss.remoting.transport.servlet.ServletServerInvoker.processRequest(ServletServerInvoker.java:231)
        at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
        at $Proxy346.processRequest(Unknown Source)
        at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.processRequest(ServerInvokerServlet.java:128)
        at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.doPost(ServerInvokerServlet.java:157)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:112)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:613)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
        at org.hibernate.loader.Loader.doQuery(Loader.java:673)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2213)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
        ... 90 more
Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e0f8f9:f559:480710b4:3b55 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e0f8f9:f559:480710b4:3b55 status: ActionStatus.ABORT_ONLY >)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
        at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
        ... 104 more
Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53e0f8f9:f559:480710b4:3b55 status: ActionStatus.ABORT_ONLY >
        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
        ... 106 more
11:55:04,985 INFO [DiscoveryBossBean] Received inventory report from RHQ Agent [Agent[id=500050,name=172.31.7.7,address=172.31.7.7,port=16163,remote-endpoint=socket://172.31.7.7:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200,last-availability-report=2008-04-17 11:54:45.636]]. Number of added roots: 1
11:55:06,123 INFO [DiscoveryBossBean] Inventory merge complete for [31] Resources in [1142]ms

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jaroslaw Kijanowski - 17/Apr/08 05:47 AM
FYI, I didn't see this when importing EAP4.3 on solaris9... will try 4.0.5
I'm using rev 9868 / 589 / 652

Heiko W. Rupp - 17/Apr/08 06:05 AM
It may have to do with the fact that I have a alert template installed (on platfom level)
But when I just added a eap 3 on another agent, I also did not see the error.

Heiko W. Rupp - 17/Apr/08 10:45 AM
I haven't seen it on this import of a 4.0.5 instance.

Charles Crouch - 20/May/08 07:47 PM
I just saw the exact same thing on jon03. Brand new jon2.0.GA setup, imported the RHQ server and platform, then ran a discovery and imported a 4.0.5 instance.

2008-05-20 20:20:36,449 INFO [org.rhq.enterprise.server.discovery.DiscoveryBossBean] Inventory merge complete for [21] Resources in [403]ms
2008-05-20 20:20:36,486 INFO [org.rhq.enterprise.server.discovery.DiscoveryServerServiceImpl] Performance: inventory merge of [21] resource in (441)ms
2008-05-20 20:20:36,921 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
2008-05-20 20:20:36,921 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (CCROUCH_JON2.RHQ_MEAS_SCHED_UNIQ) violated

2008-05-20 20:20:36,934 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
2008-05-20 20:20:36,934 ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: a12006c:ce08:48336726:160f status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: a12006c:ce08:48336726:160f status: ActionStatus.ABORT_ONLY >)
2008-05-20 20:20:36,939 WARN [org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean] problem creating schedules for resourceId = 500286
javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
        at org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean.getSchedulesForResourceAndItsDescendants(MeasurementScheduleManagerBean.java:942)
        at org.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean.getSchedulesForResourceAndItsDescendants(MeasurementScheduleManagerBean.java:130)
        at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
        at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
        at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.checkRequiredPermissions(RequiredPermissionsInterceptor.java:153)

Charles Crouch - 20/May/08 07:49 PM
Similar to what Heiko was seeing resource 500286 is the JBAS 4.0.5 instance itself, but that seemed to be collecting metrics just fine

Joseph Marques - 02/Jul/08 05:29 AM
almost positive RHQ-297 (and related fixes) have fixed this. jshaughn did the verification in that arena, so pushing to him to verify this is fixed now.

Jay Shaughnessy - 07/Jul/08 10:04 AM
I'd like to think that this is related to and fixed by my most recent changes for RHQ-297 but I'm not so sure. here are a few reasons why we may still have an issue:

- The violated constraint is RHQ_MEAS_SCHED_UNIQ and this would indicate that we are trying to insert the a measument_sched row for the the same resourceId-measurementDefinition multiple times.

- ccrouch does not indicate that he was manually adding the JBAS instance.

The RHQ-297 has more to do with a missing measurement schedule as opposed to a duplicate, and the latest round of fixes was more surrounding manual add. Still, the area of code is relevant and there will be more restructuring based for RHQ-573. I'll keep this open for now but it is possible that this hos or will go away as a result of that work.

Joseph Marques - 15/Sep/08 08:36 AM
raising to blocker so it gets on the 1.1.0 release radar. 4.0.5 is going to be a pretty common setup (i'd think), so we probably want to make sure that importing instances of this kind is solid. gotta investigate the underlying cause to see why applying measurement schedules is making things croak. obviously this works most of the time, so there must be some corner case in the logic we're not handling correctly yet.

Jay Shaughnessy - 01/Oct/08 10:41 AM
I haven't seen this recently and there have been many code changes in this area. If we can't reproduce I think we can assume it's fixed.

Jeff Weiss - 06/Oct/08 08:08 PM
Fixed, rev1712