jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-8530) Ensure MBean are deregistered if the repository fails to start
Date Tue, 06 Aug 2019 13:46:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-8530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16901070#comment-16901070
] 

Marcel Reutegger commented on OAK-8530:
---------------------------------------

Looks good to me.

[~stillalex], WDYT? You also worked on the Oak builder at some point.

> Ensure MBean are deregistered if the repository fails to start
> --------------------------------------------------------------
>
>                 Key: OAK-8530
>                 URL: https://issues.apache.org/jira/browse/OAK-8530
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: 1.18.0
>
>
> When used in OSGi environments the repository service is unfortunately prone to restarts
( see SLING-7811 for the gory details ). Besides the performance problem, the repository typically
fails to restart since MBeans that were registered once were not deregistered. The failures
happen before repository is constructed, so there is no instance to close.
> A typical stack trace is
> {noformat}
> 06.08.2019 09:55:03.894 *ERROR* [Apache Sling Repository Startup Thread #4] org.apache.aries.jmx.whiteboard.MBeanHolder
register: Failure registering MBean org.apache.jackrabbit.oak.management.RepositoryManager@5e05b159
> javax.management.InstanceAlreadyExistsException: org.apache.jackrabbit.oak:name=repository
manager,type=RepositoryManagement
> 	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:88)
> 	at org.apache.aries.jmx.whiteboard.Activator$MBeanTracker.addingService(Activator.java:102)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:871)
> 	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:903)
> 	at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
> 	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
> 	at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
> 	at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
> 	at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
> 	at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:302)
> 	at org.apache.jackrabbit.oak.osgi.OsgiWhiteboard.register(OsgiWhiteboard.java:79)
> 	at org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean(WhiteboardUtils.java:115)
[org.apache.jackrabbit.oak-core-spi:1.18.0.SNAPSHOT]
> 	at org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean(WhiteboardUtils.java:99)
[org.apache.jackrabbit.oak-core-spi:1.18.0.SNAPSHOT]
> 	at org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:772) [org.apache.jackrabbit.oak-core:1.18.0.SNAPSHOT]
> 	at org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:671) [org.apache.jackrabbit.oak-core:1.18.0.SNAPSHOT]
> 	at org.apache.jackrabbit.oak.jcr.Jcr.createContentRepository(Jcr.java:376) [org.apache.jackrabbit.oak-jcr:1.18.0.SNAPSHOT]
> 	at org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.acquireRepository(OakSlingRepositoryManager.java:152)
[org.apache.sling.jcr.oak.server:1.2.2]
> 	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:481)
[org.apache.sling.jcr.base:3.0.6]
> 	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:86)
[org.apache.sling.jcr.base:3.0.6]
> {noformat}
> I will propose a patch shortly.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message