[ https://issues.apache.org/jira/browse/SLING-5602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199354#comment-15199354 ]
Stefan Egli commented on SLING-5602: ------------------------------------ sounds good what I saw just now as another potential lead is that on a successful reactivation there's "more service re-registration going on" than on a failed one. I've added a separate felix.log that prints out debug statements of 'org.apache.felix'. Here's a successful run: {noformat} 17.03.2016 12:23:26.042 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [440, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.043 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [441, [javax.servlet.Servlet]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.191 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.jaas Deregistering Login ModuleFactory OsgiLoginModuleProvider{className=org.apache.sling.auth.form.impl.jaas.JaasHelper$1, ranking=1000, flag=LoginModuleControlFlag: sufficient, realmName='jackrabbit.oak'} 17.03.2016 12:23:26.214 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [383, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.215 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [384, [javax.servlet.Servlet]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.244 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [516, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent REGISTERED 17.03.2016 12:23:26.245 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [517, [javax.servlet.Servlet]] ServiceEvent REGISTERED 17.03.2016 12:23:26.260 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [525, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent REGISTERED 17.03.2016 12:23:26.260 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [517, [javax.servlet.Servlet]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.262 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [526, [javax.servlet.Servlet]] ServiceEvent REGISTERED 17.03.2016 12:23:26.307 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [547, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent REGISTERED 17.03.2016 12:23:26.308 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [526, [javax.servlet.Servlet]] ServiceEvent UNREGISTERING 17.03.2016 12:23:26.309 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [548, [javax.servlet.Servlet]] ServiceEvent REGISTERED 17.03.2016 12:23:26.450 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.jaas Registering LoginModuleFactory LoginModule Support for FormAuthenticationHandler (org.apache.sling.auth.form.impl.jaas.FormLoginModule) 17.03.2016 12:23:26.454 *WARN* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.http.jetty Deprecation warning: Listener registered through Apache Felix whiteboard service: [org.apache.sling.api.auth.Authenticator, org.apache.sling.auth.core.AuthenticationSupport, javax.servlet.ServletRequestListener]. Please change your code to the OSGi Http Whiteboard Service. 17.03.2016 12:23:26.493 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [589, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent REGISTERED 17.03.2016 12:23:26.493 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [590, [javax.servlet.Servlet]] ServiceEvent REGISTERED {noformat} and here is a failure case: {noformat} 17.03.2016 12:23:56.506 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [516, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent UNREGISTERING 17.03.2016 12:23:56.550 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [674, [org.apache.felix.inventory.InventoryPrinter]] ServiceEvent REGISTERED 17.03.2016 12:23:56.550 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [548, [javax.servlet.Servlet]] ServiceEvent UNREGISTERING 17.03.2016 12:23:56.552 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl)] org.apache.felix.inventory Service [675, [javax.servlet.Servlet]] ServiceEvent REGISTERED {noformat} > The Discovery module does not work any more after a ResourceResolverFactory > reactivation > ---------------------------------------------------------------------------------------- > > Key: SLING-5602 > URL: https://issues.apache.org/jira/browse/SLING-5602 > Project: Sling > Issue Type: Bug > Components: ResourceResolver > Affects Versions: Resource Resolver 1.4.8 > Reporter: Radu Cotescu > Assignee: Carsten Ziegeler > Priority: Blocker > Fix For: Resource Resolver 1.4.10 > > > The Discovery module does not work any more after the Resource Resolver > Factory is reconfigured. To reproduce this start the latest launchpad (built > from > https://github.com/apache/sling/blob/c441d5b672d1952a82a1c9fe1e6d81e86cec0018/launchpad/builder/src/main/provisioning/sling.txt) > and then: > # go to > http://localhost:8080/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl > # click on save (this will trigger the component's reactivation) > # check the error log > {noformat} > 14.03.2016 16:29:57.331 *ERROR* > [discovery.connectors.common.runner.7fd8d00a-802a-4367-a384-64024e28dbbc.discoveryLiteCheck] > org.apache.sling.discovery.oak.cluster.OakClusterViewService > getLocalClusterView: repository exception: java.lang.Exception: Could not > adapt resourceResolver to session: > org.apache.sling.resourceresolver.impl.ResourceResolverImpl@499d9cc9 > java.lang.Exception: Could not adapt resourceResolver to session: > org.apache.sling.resourceresolver.impl.ResourceResolverImpl@499d9cc9 > at > org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteDescriptor.getDescriptorFrom(DiscoveryLiteDescriptor.java:41) > at > org.apache.sling.discovery.oak.cluster.OakClusterViewService.getLocalClusterView(OakClusterViewService.java:111) > at > org.apache.sling.discovery.base.commons.BaseDiscoveryService.getTopology(BaseDiscoveryService.java:77) > at > org.apache.sling.discovery.oak.OakDiscoveryService.checkForTopologyChange(OakDiscoveryService.java:657) > at > org.apache.sling.discovery.oak.pinger.OakViewChecker.discoveryLiteCheck(OakViewChecker.java:232) > at > org.apache.sling.discovery.oak.pinger.OakViewChecker.access$000(OakViewChecker.java:64) > at > org.apache.sling.discovery.oak.pinger.OakViewChecker$1.run(OakViewChecker.java:208) > at > org.apache.sling.discovery.base.commons.PeriodicBackgroundJob.safelyRun(PeriodicBackgroundJob.java:86) > at > org.apache.sling.discovery.base.commons.PeriodicBackgroundJob.run(PeriodicBackgroundJob.java:77) > at java.lang.Thread.run(Thread.java:745) > 14.03.2016 16:29:57.332 *INFO* > [discovery.connectors.common.runner.7fd8d00a-802a-4367-a384-64024e28dbbc.discoveryLiteCheck] > org.apache.sling.discovery.base.commons.BaseDiscoveryService getTopology: > undefined cluster view: REPOSITORY_EXCEPTION] > org.apache.sling.discovery.base.commons.UndefinedClusterViewException: > Exception while processing descriptor: java.lang.Exception: Could not adapt > resourceResolver to session: > org.apache.sling.resourceresolver.impl.ResourceResolverImpl@499d9cc9 > 14.03.2016 16:29:57.332 *INFO* > [discovery.connectors.common.runner.7fd8d00a-802a-4367-a384-64024e28dbbc.discoveryLiteCheck] > org.apache.sling.discovery.commons.providers.base.ViewStateManagerImpl > enqueueForAll: sending topologyEvent TopologyEvent [type=TOPOLOGY_CHANGING, > oldView=DefaultTopologyView[current=false, num=1, > instances=7fd8d00a-802a-4367-a384-64024e28dbbc[local=true,leader=true]], > newView=null], to all (5) listeners > 14.03.2016 16:29:57.332 *ERROR* [Discovery-AsyncEventSender] > org.apache.sling.discovery.oak.TopologyWebConsolePlugin > addDiscoveryLiteHistoryEntry: Exception: java.lang.Exception: Could not adapt > resourceResolver to session: > org.apache.sling.resourceresolver.impl.ResourceResolverImpl@149e86f0 > java.lang.Exception: Could not adapt resourceResolver to session: > org.apache.sling.resourceresolver.impl.ResourceResolverImpl@149e86f0 > at > org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteDescriptor.getDescriptorFrom(DiscoveryLiteDescriptor.java:41) > at > org.apache.sling.discovery.oak.TopologyWebConsolePlugin.updateDiscoveryLiteHistory(TopologyWebConsolePlugin.java:771) > at > org.apache.sling.discovery.oak.TopologyWebConsolePlugin.handleTopologyEvent(TopologyWebConsolePlugin.java:722) > at > org.apache.sling.discovery.commons.providers.base.AsyncTopologyEvent.trigger(AsyncTopologyEvent.java:53) > at > org.apache.sling.discovery.commons.providers.base.AsyncEventSender.run(AsyncEventSender.java:118) > at java.lang.Thread.run(Thread.java:745) > {noformat} > The Discovery module will not recover from this state. Furthermore it will > also prevent the RRF to reactivate and basically makes the instance unusable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)