Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-40122

Rebuilding indexes from scratch causes error

    XMLWordPrintable

Details

    Description

      Summary

      When rebuilding indexes as mentioned in the documentation https://confluence.atlassian.com/display/CONFKB/How+to+rebuild+the+content+indexes+from+scratch
      causes confluence to error on startup

      Steps to reproduce
      1. Start Confluence, set it up and shut it down
      2. Delete the index directory (as if you were rebuilding the index from scratch)
      3. Start Confluence again
      Expected Results
      1. Confluence creates the index directory, and the edge directory
      Actual Results
      • Confluence creates the index directory, but not the edge directory.
      • Errors such as Aww shoot, we can't find that page. appear when clicking on the Popular tab.
      • The "Confluence Edge Index" plugin is disabled
      • If the site is accessed via a mobile device or via the URL (http://confluence.company.com/plugins/servlet/mobile#dashboard), the error

        There was an error loading the stream items.

        appears.

      • The following log entry can be found in atlassian-confluence.log
        2015-12-03 23:31:32,332 ERROR [ThreadPoolAsyncTaskExecutor::Thread 13] [plugin.osgi.factory.OsgiPlugin] onPluginContainerFailed Unable to start the plugin container for plugin 'com.atlassian.confluence.plugins.confluence-edge-index'
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'edgeLuceneConnectionFactoryBean' defined in URL [bundle://169.0:0/META-INF/spring/pluginContext.xml]: Cannot resolve reference to bean 'directory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error
         creating bean with name 'directory': FactoryBean threw exception on object creation; nested exception is com.atlassian.bonnie.LuceneException: java.io.IOException: Unable to create index directory '/Users/dayanaazmi/CONF_591PostgreSQL_Home/index/edge'
        	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
        	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
        	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
        	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
        	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
        	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
        	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:835)
        	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
        	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
        	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
        	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
        	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
        	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)
        Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'directory': FactoryBean threw exception on object creation; nested exception is com.atlassian.bonnie.LuceneException: java.io.IOException: Unable to create index directory '/Users/dayanaazmi/CONF_591PostgreSQL_Home/index/edge'
        	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
        	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1584)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:253)
        	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
        	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
        	... 21 more
        Caused by: com.atlassian.bonnie.LuceneException: java.io.IOException: Unable to create index directory '/Users/dayanaazmi/CONF_591PostgreSQL_Home/index/edge'
        	at com.atlassian.bonnie.DirectoryUtil.getDirectory(DirectoryUtil.java:34)
        	at com.atlassian.confluence.plugins.edgeindex.lucene.DirectoryFactory.getObject(DirectoryFactory.java:25)
        	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
        	... 26 more
        Caused by: java.io.IOException: Unable to create index directory '/Users/dayanaazmi/CONF_591PostgreSQL_Home/index/edge'
        	at com.atlassian.bonnie.DirectoryUtil.getDirectory(DirectoryUtil.java:25)
        	... 28 more
        
      Notes

      This is not related to Filesystem permissions. The parent folder is created, and files are placed in it, which suggests that the folder and it's contents are writeable

      This has been observed in Windows and Linux.

      Workaround

      Create the confluence-home/index/edge folder, and then manually enable the "Confluence Edge Index" plugin.

      Attachments

        Issue Links

          Activity

            People

              qpham@atlassian.com Quan Pham
              msayed Mizan Ali Sayed (Inactive)
              Votes:
              11 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: