Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-423

using LeaseDatabaseLocker; broker periodically fails to restart after losing and reacquiring the lease, fails with exception - javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=jdbcBroker,service=Health

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.1
    • JBoss A-MQ 6.0
    • None
    • None

      Configured the broker instance with the following| |

      <persistenceAdapter>
      <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#mysql-ds" lockKeepAlivePeriod="5000" >
      <databaseLocker>
      <lease-database-locker lockAcquireSleepInterval="10000"/>
      </databaseLocker>
      </jdbcPersistenceAdapter>
      </persistenceAdapter>
       
      <ioExceptionHandler>
      <jDBCIOExceptionHandler/>
      </ioExceptionHandler>
       

      Periodically; if the broker instance loses the lease and subsequently reacquires the lease it fails with the following exception| |

      ERROR | Failed to start Apache ActiveMQ (jdbcBroker, null). Reason: java.io.IOException: Status MBean could not be registered in JMX: org.apache.activemq:type=Broker,brokerName=jdbcBroker,service=Health
      java.io.IOException: Status MBean could not be registered in JMX: org.apache.activemq:type=Broker,brokerName=jdbcBroker,service=Health
      at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
      at org.apache.activemq.broker.BrokerService.addInterceptors(BrokerService.java:2199)
      at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:2080)
      at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:909)
      at org.apache.activemq.broker.BrokerService.getAdminConnectionContext(BrokerService.java:2350)
      at org.apache.activemq.broker.BrokerService.startVirtualConsumerDestinations(BrokerService.java:2490)
      at org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:2341)
      at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:643)
      at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:635)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:571)
      at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
      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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
      at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:101)
      at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:101)
      at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65)
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
      at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
      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.apache.activemq.console.Main.runTaskClass(Main.java:262)
      at org.apache.activemq.console.Main.main(Main.java:115)
      Caused by: javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=jdbcBroker,service=Health
      at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
      at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:380)
      at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:72)
      at org.apache.activemq.broker.BrokerService.addInterceptors(BrokerService.java:2197)
       

              gtully@redhat.com Gary Tully
              rhn-support-pfox Patrick Fox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: