Qpid
  1. Qpid
  2. QPID-2927

JMX Shutdown plugin throws InstanceNotFoundException during broker shutdown

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: Java Broker
    • Labels:
      None

      Description

      If the broker is stopped cleanly it emits an InstanceNotFoundException on the terminal when stopping the JMX Shutdown plugin bundle. This is because the when the ApplicationRegistry shutdown hook is run, the JMXManagedObjectRegistry unregisters all MBeans in the 'org.apache.qpid' domain whilst closing, presumably before Felix is shut down and thus causing the Shutdown plugin to fail when trying to unregister the shutdown MBean again explicitly.

      This can be handled by simply catching the INFE in the Activator, such that the MBean is unregistered if the bundle were to be stopped before the broker, but no exception is thrown in the reverse case.

      ERROR: Error stopping bundle. (javax.management.InstanceNotFoundException: org.apache.qpid:type=ShutdownMBean)
      javax.management.InstanceNotFoundException: org.apache.qpid:type=ShutdownMBean
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:415)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)
      at org.apache.qpid.shutdown.Activator.stop(Activator.java:59)
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:683)
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2128)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1152)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)

        Activity

        Robbie Gemmell created issue -
        Robbie Gemmell made changes -
        Field Original Value New Value
        Assignee Robbie Gemmell [ gemmellr ]
        Robbie Gemmell made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Sorin Suciu added a comment -

        Hi Robbie,
        Could you review this patch please?

        Thanks,

        Sorin

        Show
        Sorin Suciu added a comment - Hi Robbie, Could you review this patch please? Thanks, Sorin
        Sorin Suciu made changes -
        Attachment qpid-2927.patch [ 12458887 ]
        Hide
        Robbie Gemmell added a comment -

        I have already applied a similar update previously to resolve the issue, so the patch wont apply / isnt necessary anyway.

        Show
        Robbie Gemmell added a comment - I have already applied a similar update previously to resolve the issue, so the patch wont apply / isnt necessary anyway.
        Hide
        Marnie McCormack added a comment -

        Change looks fine.

        Show
        Marnie McCormack added a comment - Change looks fine.
        Marnie McCormack made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development