Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6324

MonitoringDistributionPackageBuilder registering of same beans cause exception

    XMLWordPrintableJSON

Details

    Description

      While distributing some content massively I have encountered lots of stacktraces like below (on sending instance):

      24.11.2016 13:09:37.424 *INFO* [127.0.0.1 [1479989377273] POST /bin/replicate.json HTTP/1.1] org.apache.sling.distribution.agent.impl.SimpleDistributionAgent [agent][publish] REQUEST-START DSTRQ2791: ADD paths=[/content/test10K/node27/subnode90], user=replication-service
      24.11.2016 13:09:37.425 *ERROR* [sling-threadpool-7c966356-fcc8-467b-9d58-eab12551b43c-(apache-sling-job-thread-pool)-2-org_apache_sling_distribution_queue_publish_default(org/apache/sling/distribution/queue/publish/default)] org.apache.aries.jmx.whiteboard.MBeanHolder register: Failure registering MBean org.apache.aries.jmx.util.shared.RegistrableStandardEmitterMBean@42b86d48
      javax.management.InstanceAlreadyExistsException: org.apache.sling.distribution:type=distributionpackage,id="/var/sling/distribution/packages/kryo-cs/data/dstrpck-1479989376714-b79fc9b9-a3e2-4a03-a33c-e87ccd17b8dc"
      	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
      	at org.apache.aries.jmx.whiteboard.MBeanHolder.register(MBeanHolder.java:114)
      	at org.apache.aries.jmx.whiteboard.JmxWhiteboardSupport.registerMBean(JmxWhiteboardSupport.java:86)
      	at org.apache.aries.jmx.whiteboard.Activator$MBeanTracker.addingService(Activator.java:102)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
      	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
      	at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
      	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4558)
      	at org.apache.felix.framework.Felix.registerService(Felix.java:3550)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
      	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
      	at org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.registerDistributionPackageMBean(MonitoringDistributionPackageBuilder.java:109)
      	at org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.getPackage(MonitoringDistributionPackageBuilder.java:81)
      	at org.apache.sling.distribution.serialization.impl.DistributionPackageBuilderFactory.getPackage(DistributionPackageBuilderFactory.java:222)
      	at org.apache.sling.distribution.packaging.impl.exporter.LocalDistributionPackageExporter.getPackage(LocalDistributionPackageExporter.java:55)
      	at org.apache.sling.distribution.agent.impl.SimpleDistributionAgentQueueProcessor.processQueueItem(SimpleDistributionAgentQueueProcessor.java:116)
      	at org.apache.sling.distribution.agent.impl.SimpleDistributionAgentQueueProcessor.process(SimpleDistributionAgentQueueProcessor.java:84)
      	at org.apache.sling.distribution.queue.impl.jobhandling.DistributionAgentJobConsumer.process(DistributionAgentJobConsumer.java:48)
      	at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)
      	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)
      	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)
      	at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      It seems MonitoringDistributionPackageBuilder is registering same beans multiple times, however the mentioned exception doesn't block distribution request processing it seems.

      Attachments

        1. SLING-6324.patch
          2 kB
          Simone Tripodi

        Activity

          People

            marett Timothee Maret
            teofili Tommaso Teofili
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: