Confluence fails to start due Failed to create searcher for directory or read past EOF

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears in the atlassian-confluence.log:

2014-04-14 16:57:32,323 ERROR [main] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'macroIconManager' defined in class path resource [services/pluginServiceContext.xml]: Cannot resolve reference to bean 'httpRetrievalService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpRetrievalService' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'upgradeManager' while setting bean property 'upgradeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upgradeManager' defined in class path resource [upgradeSubsystemContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInformationService' defined in class path resource [services/statusServiceContext.xml]: Cannot resolve reference to bean 'luceneConnection' while setting bean property 'luceneConnection'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneConnection' defined in class path resource [indexingSubsystemContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bonnie.LuceneConnection]: Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: Failed to create searcher for directory: org.apache.lucene.store.SimpleFSDirectory@/home/confluence/atlassian/application-data/confluence/index lockFactory=org.apache.lucene.store.SimpleFSLockFactory@4cc81c

...

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource [applicationContext.xml]: 

...

Caused by: com.atlassian.bonnie.LuceneException: Failed to create searcher for directory: org.apache.lucene.store.SimpleFSDirectory@/home/confluence/atlassian/application-data/confluence/index lockFactory=org.apache.lucene.store.SimpleFSLockFactory@80bc28

...

Caused by: java.io.IOException: read past EOF

Cause

Lucene is not able to create the index.

Resolution

Confluence Server

Rebuild the Indexes from Scratch: How to Rebuild the Content Indexes From Scratch on Confluence Server


Confluence Data Center

It may be possible to resolve this issue by recovering an index snapshot from one of the neighboring nodes in the cluster. To do this, follow up these steps: 

  1. Ensure that index snapshot recovery is enabled by ensuring the following parameter is NOT present in <Confluence-install-directory>/Dconfluence.cluster.index.recovery.num.attempts=0
    (info) 
    If the Dconfluence.cluster.index.recovery.num.attempts=0 parameter is present in set-env.sh, then index snapshot recovery is not enabled on the node. In order to enable index snapshot recovery, you must remove this parameter before proceeding. 
  2. Back up the local node home directory for safe keeping
  3. Remove the following directories
    <confluence-node-home>/index/
    <confluence-home>/journal/
  4. Start the node

If the issue still persists after recovering from a peer node snapshot, follow the steps as outlined in How to Rebuild the Content Indexes From Scratch on Confluence Data Center to rebuild the entire cluster reindex from scratch. 

Last modified on Dec 11, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.