Uploaded image for project: 'Atlassian Cloud'
  1. Atlassian Cloud
  2. CLOUD-5495

JIRA can johnson in initial data setup due to attempt to delete non-existent osgi cache directory.

    XMLWordPrintable

Details

    Description

      An intermittent failure to delete the osgi cache directory during initial data can fail in a way that renders JIRA inaccessible:

      2011-08-30 20:16:11,427 main ERROR      [jira.studio.startup.JiraInitialData] Error doing studio specific setup
      com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix
      	at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:91)
      	at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.<init>(DefaultOsgiPersistentCache.java:37)
      	at com.atlassian.jira.plugin.PluginPath$JiraHomeAdapter.<init>(PluginPath.java:71)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at org.picocontainer.defaults.InstantiatingComponentAdapter.].
      newInstance(InstantiatingComponentAdapter.java:100)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:200)
      	at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198)
      	at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198)
      	at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getConstructorArguments(ConstructorInjectionComponentAdapter.java:222)
      	at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.instantiateComponent(ConstructorInjectionComponentAdapter.java:198)
      	at org.picocontainer.defaults.InstantiatingComponentAdapter.getComponentInstance(InstantiatingComponentAdapter.java:48)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at org.picocontainer.defaults.SynchronizedComponentAdapter.getComponentInstance(SynchronizedComponentAdapter.java:35)
      	at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:42)
      	at com.atlassian.jira.config.component.ProfilingComponentAdapter.getComponentInstance(ProfilingComponentAdapter.java:45)
      	at org.picocontainer.defaults.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:298)
      	at com.atlassian.jira.ComponentManager.getComponent(ComponentManager.java:542)
      	at com.atlassian.jira.ComponentManager.getComponentInstanceOfType(ComponentManager.java:501)
      	at com.atlassian.jira.ComponentManager$PluginSystem.getPluginSystemLifecycle(ComponentManager.java:668)
      	at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManager.java:678)
      	at com.atlassian.jira.ComponentManager.startPluginSystem(ComponentManager.java:243)
      	at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java:236)
      	at com.atlassian.jira.ComponentManager.start(ComponentManager.java:221)
      	at com.atlassian.jira.ManagerFactory.globalRefresh(ManagerFactory.java:179)
      	at com.atlassian.jira.util.system.JiraSystemRestarterImpl.restartPico(JiraSystemRestarterImpl.java:55)
      	at com.atlassian.jira.util.system.JiraSystemRestarterImpl.ariseSirJIRA(JiraSystemRestarterImpl.java:29)
      	at com.atlassian.jira.studio.startup.JiraInitialData.restartJira(JiraInitialData.java:202)
      	at com.atlassian.jira.studio.startup.JiraInitialData.start(JiraInitialData.java:83)
      	at com.atlassian.jira.studio.startup.StartupHooks.afterJiraStart(StartupHooks.java:63)
      	at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:99)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      	at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.io.FileNotFoundException: File does not exist: /opt/bamboo-agent/xml-data/build-dir/JST-JST-JOBC/studio-fireball/target/home/jira-home/plugins/.osgi-plugins/felix/felix-cache/bundle82/bundle.state
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1386)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
      	at com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache.validate(DefaultOsgiPersistentCache.java:87)
      	... 64 more
      

      See also JSTDEV-226: failure to delete the cache directory has been seen in other apps without noticeable consequences.

      The fact that the plugin system should not fail when attempting to delete a missing file has been acknowledged in PLUG-796. However, we need to understand why this is happening in JIRA.
      From fakraemer:

      We restart JIRA there, so my first thought that it might be a problem with an old plugin system instance working on the same directory, but I wouldn't completely leave out the possibility that this might be another NFS issue related to HPT-619.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rfernandes Robin Fernandes (go/robinleave) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: