Confluence can't write to index directory
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Confluence's indexer is unable to save after running, so the index does not get updated. Like other indexing issues, this affects RSS feeds, searching, Recently Updated, the People Directory, Space Activity. This may also affect other functions in Confluence not mentioned here.
The following appears in the atlassian-confluence.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2012-10-25 14:27:01,593 ERROR [scheduler_Worker-3] [org.quartz.core.JobRunShell] run Job DEFAULT.IndexQueueFlusher threw an unhandled Exception:
com.atlassian.bonnie.LuceneException: com.atlassian.bonnie.LuceneException: Couldn't open writer on directory: org.apache.lucene.store.SimpleFSDirectory@<confluence-home>/index lockFactory=org.apache.lucene.store.SimpleFSLockFactory@6305b346
at com.atlassian.bonnie.LuceneConnection.withBatchUpdate(LuceneConnection.java:409)
at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.processTasks(DefaultConfluenceIndexManager.java:191)
at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.flushQueue(DefaultConfluenceIndexManager.java:144)
at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy41.flushQueue(Unknown Source)
at com.atlassian.confluence.search.lucene.IndexQueueFlusher.executeJob(IndexQueueFlusher.java:29)
at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:63)
at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:46)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:15)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: com.atlassian.bonnie.LuceneException: Couldn't open writer on directory: org.apache.lucene.store.SimpleFSDirectory@<confluence-home>/index lockFactory=org.apache.lucene.store.SimpleFSLockFactory@6305b346
at com.atlassian.bonnie.LuceneConnection.withWriter(LuceneConnection.java:346)
at com.atlassian.confluence.search.lucene.tasks.LuceneConnectionBackedIndexTaskPerformer.perform(LuceneConnectionBackedIndexTaskPerformer.java:20)
at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager$BatchUpdateAction.perform(DefaultConfluenceIndexManager.java:418)
at com.atlassian.bonnie.LuceneConnection.withBatchUpdate(LuceneConnection.java:405)
... 19 more
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@<confluence-home>/index/write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:85)
at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1562)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1118)
at com.atlassian.bonnie.LuceneConnection.withWriter(LuceneConnection.java:327)
... 22 more
Cause
Confluence is not able to save the index to hard disk as it's not able to write there. This is usually caused by insufficient permissions to write, but could also happen if that filesystem ran out of space.
Resolution
Determine the user who runs Confluence
Make sure that the index directory is owned by and has write permissions for this user
1
2
chown -R <user> <confluence-home>/index
chmod -R u+rwX <confluence-home>/index
Was this helpful?