Aries
  1. Aries
  2. ARIES-663

ConfigurationAdminMBean registered twice

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: jmx-core-0.3.1, 1.0
    • Component/s: None
    • Labels:
      None

      Description

      18:00:12,965 INFO  [jmx] Starting JMX OSGi agent
      18:00:12,982 INFO  [jmx] Registering MBean with ObjectName [osgi.compendium:service=cm,version=1.3] for service with service.id [12]
      18:00:12,990 INFO  [HostBundleState] Bundle started: org.apache.aries.jmx:0.3.0
      18:00:12,993 INFO  [HostBundleState] Bundle started: org.apache.aries.util:0.3.0
      18:00:12,994 INFO  [jmx] Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.compendium:service=cm,version=1.3
      18:00:13,003 INFO  [jmx] Registering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.core:type=bundleState,version=1.5
      18:00:13,005 INFO  [jmx] Registering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.core:type=packageState,version=1.5
      18:00:13,006 INFO  [jmx] Registering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.core:type=serviceState,version=1.5
      18:00:13,007 INFO  [jmx] Registering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.compendium:service=cm,version=1.3
      18:00:13,009 ERROR [jmx] MBean is already registered
      org.apache.felix.log.LogException: javax.management.InstanceAlreadyExistsException: osgi.compendium:service=cm,version=1.3
      	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.aries.jmx.agent.JMXAgentImpl.registerMBeans(JMXAgentImpl.java:129)
      	at org.apache.aries.jmx.agent.JMXAgentContext.registerMBeans(JMXAgentContext.java:58)
      	at org.apache.aries.jmx.MBeanServiceTracker$1.run(MBeanServiceTracker.java:61)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:619)
      18:00:13,010 INFO  [jmx] Registering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@5d5bdc50 with name osgi.core:type=framework,version=1.5
      
      1. ARIES-663.patch
        18 kB
        Guillaume Nodet

        Activity

        Guillaume Nodet made changes -
        Fix Version/s jmx-core-0.3.1 [ 12321545 ]
        Fix Version/s 1.0 [ 12321544 ]
        Guillaume Nodet made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Guillaume Nodet [ gnt ]
        Resolution Fixed [ 1 ]
        Guillaume Nodet made changes -
        Field Original Value New Value
        Attachment ARIES-663.patch [ 12521471 ]
        Hide
        Guillaume Nodet added a comment -

        I also have the following related problem

        2012-04-04 16:58:20,315 | INFO | pool-9-thread-1 | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering MBean with ObjectName [osgi.compendium:service=cm,version=1.3] for service with service.id [11]
        2012-04-04 16:58:20,315 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering mbean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.compendium:service=cm,version=1.3
        2012-04-04 16:58:20,339 | INFO | NAPSHOT-thread-1 | BlueprintContainerImpl | container.BlueprintContainerImpl 271 | 8 - org.apache.aries.blueprint - 0.3.2.fuse-SNAPSHOT | Bundle org.apache.karaf.shell.config is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0))]
        2012-04-04 16:58:20,340 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=serviceState,version=1.5
        2012-04-04 16:58:20,340 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=bundleState,version=1.5
        2012-04-04 16:58:20,350 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=framework,version=1.5
        2012-04-04 16:58:20,350 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.compendium:service=cm,version=1.3
        2012-04-04 16:58:20,351 | ERROR | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Mbena doesn't exist in the repository
        javax.management.InstanceNotFoundException: osgi.compendium:service=cm,version=1.3
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)[:1.6.0_29]
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:415)[:1.6.0_29]
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)[:1.6.0_29]
        at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)[:1.6.0_29]
        at org.apache.aries.jmx.agent.JMXAgentImpl.unregisterMBeans(JMXAgentImpl.java:158)[32:org.apache.aries.jmx:0.3.0]
        at org.apache.aries.jmx.agent.JMXAgentContext.unregisterMBeans(JMXAgentContext.java:66)[32:org.apache.aries.jmx:0.3.0]
        at org.apache.aries.jmx.MBeanServiceTracker$2.run(MBeanServiceTracker.java:83)[32:org.apache.aries.jmx:0.3.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_29]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_29]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_29]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_29]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_29]
        at java.lang.Thread.run(Thread.java:680)[:1.6.0_29]
        2012-04-04 16:58:20,352 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=packageState,version=1.5

        Show
        Guillaume Nodet added a comment - I also have the following related problem 2012-04-04 16:58:20,315 | INFO | pool-9-thread-1 | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering MBean with ObjectName [osgi.compendium:service=cm,version=1.3] for service with service.id [11] 2012-04-04 16:58:20,315 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering mbean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.compendium:service=cm,version=1.3 2012-04-04 16:58:20,339 | INFO | NAPSHOT-thread-1 | BlueprintContainerImpl | container.BlueprintContainerImpl 271 | 8 - org.apache.aries.blueprint - 0.3.2.fuse-SNAPSHOT | Bundle org.apache.karaf.shell.config is waiting for namespace handlers [(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0))] 2012-04-04 16:58:20,340 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.ServiceStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=serviceState,version=1.5 2012-04-04 16:58:20,340 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.BundleStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=bundleState,version=1.5 2012-04-04 16:58:20,350 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.FrameworkMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=framework,version=1.5 2012-04-04 16:58:20,350 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.service.cm.ConfigurationAdminMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.compendium:service=cm,version=1.3 2012-04-04 16:58:20,351 | ERROR | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Mbena doesn't exist in the repository javax.management.InstanceNotFoundException: osgi.compendium:service=cm,version=1.3 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094) [:1.6.0_29] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:415) [:1.6.0_29] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403) [:1.6.0_29] at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506) [:1.6.0_29] at org.apache.aries.jmx.agent.JMXAgentImpl.unregisterMBeans(JMXAgentImpl.java:158) [32:org.apache.aries.jmx:0.3.0] at org.apache.aries.jmx.agent.JMXAgentContext.unregisterMBeans(JMXAgentContext.java:66) [32:org.apache.aries.jmx:0.3.0] at org.apache.aries.jmx.MBeanServiceTracker$2.run(MBeanServiceTracker.java:83) [32:org.apache.aries.jmx:0.3.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_29] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_29] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29] at java.lang.Thread.run(Thread.java:680) [:1.6.0_29] 2012-04-04 16:58:20,352 | INFO | JMX OSGi Agent | jmx | ? ? | 32 - org.apache.aries.jmx - 0.3.0 | Unregistering org.osgi.jmx.framework.PackageStateMBean to MBeanServer com.sun.jmx.mbeanserver.JmxMBeanServer@c5e3974 with name osgi.core:type=packageState,version=1.5
        Hide
        Guillaume Nodet added a comment -

        I have the same issue from times to time. Not sure what really happen but I've seen in the log that the CM mean was being registered twice which obviously lead to this exception. Though I only have a single copy of the felix configadmin bundle deployed ....

        Show
        Guillaume Nodet added a comment - I have the same issue from times to time. Not sure what really happen but I've seen in the log that the CM mean was being registered twice which obviously lead to this exception. Though I only have a single copy of the felix configadmin bundle deployed ....
        Hide
        Alasdair Nottingham added a comment -

        To be honest I can't see any way this can happen. The exception is caught so you get the error message and we move on, but the code base appears to me to only ever try to register a single ConfigurationAdminMBean.

        When does this happen? Do you have multiple MBeanServers in the service registry? Do you have multiple ConfigurationAdmin services? Do you restart the JMX Bundle? Does this happen on the current snapshot of svn?

        Show
        Alasdair Nottingham added a comment - To be honest I can't see any way this can happen. The exception is caught so you get the error message and we move on, but the code base appears to me to only ever try to register a single ConfigurationAdminMBean. When does this happen? Do you have multiple MBeanServers in the service registry? Do you have multiple ConfigurationAdmin services? Do you restart the JMX Bundle? Does this happen on the current snapshot of svn?
        Hide
        Thomas Diesler added a comment -

        Any update on this? We have a dependency here https://issues.jboss.org/browse/JBOSGI-453

        Show
        Thomas Diesler added a comment - Any update on this? We have a dependency here https://issues.jboss.org/browse/JBOSGI-453
        Thomas Diesler created issue -

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Thomas Diesler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development