Enabling Debug classes for Indexing Troubleshooting
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
Summary
For when automatic indexing is not occurring or you are getting errors related to indexing, these may be circumstances where you need to turn on debug logging for indexing.
Index debug logging is quite verbose, resulting in a significant increase in reindexing time if enabled. During testing, we measured an increase of about 3 times for the same data set, so use this logging only when it is really needed. Contact Atlassian support if you have any questions.
Solution
Confluence 5.9 and below...
Enabling debugging for indexing temporarily
From Administration >> Logging and Profiling, add the following package, and set to DEBUG:
1
2
com.atlassian.confluence.search.lucene
com.atlassian.bonnie
Enabling debugging for indexing permanently
Edit
<CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties
file and add1 2
log4j.logger.com.atlassian.confluence.search.lucene=DEBUG log4j.logger.com.atlassian.bonnie=DEBUG
Restart Confluence
Logging should appear in the <CONFLUENCE_HOME>/logs/atlassian-confluence.log
file, like the following:
1
2
3
4
5
2009-10-01 08:50:07,633 DEBUG [http-8080-6] [search.lucene.queue.DatabaseIndexTaskQueue] enqueue Enqueuing task: IndexQueueEntry{id=0, handle='com.atlassian.confluence.pages.Page-91258884', type=Unknown, creationDate=Thu Oct 01 08:50:07 EDT 2009}
2009-10-01 08:50:07,635 DEBUG [http-8080-6] [search.lucene.queue.DatabaseIndexTaskQueue] enqueue Enqueuing task: IndexQueueEntry{id=0, handle='com.atlassian.confluence.pages.Page-91258884', type=Unknown, creationDate=Thu Oct 01 08:50:07 EDT 2009}
2009-10-01 08:50:08,023 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Fetching index entries added since: Thu Oct 01 08:50:06 EDT 2009
2009-10-01 08:50:08,027 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Fetched 2 entries from datbase.
2009-10-01 08:50:08,027 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Having excluded entries that have previously been flushed, 2 entries remain.
Solution
Confluence 5.10 and above
Enabling debugging for indexing temporarily
From Administration >> Logging and Profiling, add the following package, and set to DEBUG:
1
2
3
com.atlassian.confluence.internal.index.AbstractBatchIndexer
com.atlassian.confluence.search.lucene
com.atlassian.bonnie.search.extractor
For very verbose logging set the full package to DEBUG, instead of just AbstractBatchIndexer (this can cause space issues on instances with lots of data):
1
com.atlassian.confluence.internal.index
Enabling debugging for indexing permanently
Edit
<CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties
file and addFor simple progress logging:
1 2 3
log4j.logger.com.atlassian.confluence.internal.index.AbstractBatchIndexer=DEBUG, indexlog log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, indexlog log4j.logger.com.atlassian.bonnie.search.extractor=DEBUG, indexlog
For very verbose logging add the full package instead of just AbstractBatchIndexer (this can cause space issues on instances with lots of data):
1 2 3
log4j.logger.com.atlassian.confluence.internal.index=DEBUG, indexlog log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, indexlog log4j.logger.com.atlassian.bonnie.search.extractor=DEBUG, indexlog
Restart Confluence
Logging should appear in the <CONFLUENCE_HOME>/logs/atlassian-confluence.log
file, like the following:
1
2
3
4
2017-04-06 13:23:56,853 DEBUG [Caesium-1-1] [confluence.search.lucene.LuceneIndexManager] flushQueue Flush requested
2017-04-06 13:23:56,923 DEBUG [Caesium-1-1] [confluence.search.lucene.PluggableSearcherInitialisation] initialise Warming up searcher..
2017-04-06 13:23:56,923 DEBUG [Caesium-1-1] [confluence.search.lucene.DefaultSearcherInitialisation] initialise Warming up searcher..
2017-04-06 13:23:56,927 DEBUG [Caesium-1-1] [confluence.search.lucene.LuceneIndexManager] flushQueue Flushed 4 items in 72 milliseconds
Logging to a separate file (prior to 7.13)
It is also possible to log index logging to another file as discussed in Configuring log4j in Confluence to send specific entries to a different log file by adding the following to <CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
log4j.appender.indexlog=org.apache.log4j.RollingFileAppender
log4j.appender.indexlog.Threshold=DEBUG
log4j.appender.indexlog.File=${catalina.home}/logs/atlassian-confluence-index.log
log4j.appender.indexlog.MaxFileSize=20480KB
log4j.appender.indexlog.MaxBackupIndex=5
log4j.appender.indexlog.layout=com.atlassian.confluence.util.PatternLayoutWithStackTrace
log4j.appender.brokenpipelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n
log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, indexlog
log4j.additivity.com.atlassian.confluence.search.lucene=false
log4j.logger.com.atlassian.confluence.internal.index.AbstractBatchIndexer=DEBUG, indexlog
log4j.additivity.com.atlassian.confluence.internal.index.AbstractBatchIndexer=false
This will log to <CONFLUENCE_HOME>/logs/atlassian-confluence-index.log.
đź’ˇConfluence 7.13 and above adds this file logging by default and the classes only need to be turned up via Administration >> Logging and Profiling.
Was this helpful?