LocalQ STATS not being dumped to application logs in Jira
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
By default, Jira logs stats every 5 minutes in application logs. However, the LocalQ Stats might not appear in the application log files if the logging level for the package for LocalQCacheManager is overwritten in log4j.properties file from "INFO" to "WARN" or "ERROR".
Environment
Jira 7.9 or newer, up to Jira 9.5
Starting with Jira 9.5 we have migrated to Log 4j runtime version 2. Please see our Release Notes and Migrating Custom Logging configurations for more details.
Diagnosis
If during the startup of the nodes, we can NOT see the below entries reporting that LocalQCacheManager was started you're probably facing this issue:
1
2
localhost-startStop-1 INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] Starting LocalQCacheManager...
INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] Done starting LocalQCacheManager.
Also, the same if we can NOT find the below log entries reporting that cache replication queue stats were started for the cache queues in the impacted nodes:
1
2
3
4
localhost-startStop-1 INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] [onStart] Running cache replication queue stats for: XX queues...
localhost-startStop-1 INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] [onStart] ... done running cache replication queue stats for: XX queues.
localq-stats-0 INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] [scheduled] Running cache replication queue stats for: XX queues...
localq-stats-0 INFO [c.a.j.c.distribution.localq.LocalQCacheManager] [LOCALQ] [scheduled] ... done running cache replication queue stats for: XX queues.
Cause
The logging level of the package forLocalQCacheManager is not set to "INFO" in log4j.properties file. For example, If it's in "WARN", this will prevent Jira to dump the LocalQ STATS in the logs.
You can validate it by opening the log4j.properties usually located in:
1
<<Jira_Installation_of_node2>>/atlassian-jira/WEB-INF/classes/log4j.properties.
Solution
Open the file "log4j.properties" located on: <<Jira_Installation_of_node>>/atlassian-jira/WEB-INF/classes/log4j.properties
Look at the logging level for the package "log4j.logger.com.atlassian.jira.cluster.distribution.localq.LocalQCacheManager".
You should find 1 or more entries;
Ensure you have only 1 and set to "INFO, filelog", like the below example:
1
log4j.logger.com.atlassian.jira.cluster.distribution.localq.LocalQCacheManager = INFO, filelog
It might be overwritten somewhere. Therefore, check the whole log4j.properties file.
Was this helpful?