-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.9, 5.8.10, 5.8.13, 5.8.15, 5.10, 6.4.0
-
18
-
Severity 3 - Minor
-
2
-
Summary
When shutting down Confluence using the service or via shutdown.sh or shutdown.bat, it can throw errors. When this happens, Confluence will appear to hang and the shutdown process is extremely slow
Steps to Reproduce
- Install Confluence
- Start Confluence
- Let Confluence run for a bit
- Shutdown Confluence
Expected Results
Confluence shutsdown without issue
Actual Results
Confluence can hang on shutdown and throw errors in the logs, for example the below exception is thrown in the atlassian-confluence.log file:
2015-10-21 12:23:13,174 ERROR [localhost-startStop-2] [internal.util.concurrent.RunnableTimedExecution] execute Closing runnable for context NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugin.notifications.notifications-module, config=osgibundle:/META-INF/spring/*.xml) did not finish in 10000ms; consider taking a snapshot and then shutdown the VM in case the thread still hangs 2015-10-21 12:23:13,174 ERROR [localhost-startStop-2] [support.internal.aop.ServiceDynamicInterceptor] serviceChanged Exception during service event handling java.lang.IllegalStateException: Invalid BundleContext. at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514) at org.apache.felix.framework.BundleContextImpl.getServiceReferences(BundleContextImpl.java:425) at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReferences(OsgiServiceReferenceUtils.java:159) at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReference(OsgiServiceReferenceUtils.java:76) at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$Listener.serviceChanged(ServiceDynamicInterceptor.java:195) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4419) at org.apache.felix.framework.Felix.access$000(Felix.java:74) at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:401) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:151) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:127) at org.apache.felix.framework.ServiceRegistry.unregisterServices(ServiceRegistry.java:196) at org.apache.felix.framework.Felix.stopBundle(Felix.java:2555) at org.apache.felix.framework.Felix.uninstallBundle(Felix.java:2632) at org.apache.felix.framework.BundleImpl.uninstall(BundleImpl.java:1022) at com.atlassian.plugin.osgi.factory.OsgiPlugin.uninstallInternal(OsgiPlugin.java:503) at com.atlassian.plugin.impl.AbstractPlugin.uninstall(AbstractPlugin.java:425) at com.atlassian.plugin.impl.AbstractDelegatingPlugin.uninstall(AbstractDelegatingPlugin.java:196) at com.atlassian.plugin.loaders.ScanningPluginLoader.onShutdown(ScanningPluginLoader.java:245) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.confluence.event.TimingEventPublisher.publish(TimingEventPublisher.java:73) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:73) at com.atlassian.plugin.manager.DefaultPluginManager.broadcast(DefaultPluginManager.java:608) at com.atlassian.plugin.manager.DefaultPluginManager.shutdown(DefaultPluginManager.java:598) at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextDestroyed(PluginFrameworkContextListener.java:77) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4776) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1413) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Workaround
- Start/shutdown Confluence using start-confluence.sh and stop-confluence.sh (or .bat if you are on Windows)
- is duplicated by
-
CONFSERVER-39757 Improve Confluence orderly shutdown
- Gathering Interest
Same on JIRA 8.2.3 clean install!
Windows Server 2012 R2 Standard