Uploaded image for project: 'Jira Software Server and Data Center'
  1. Jira Software Server and Data Center
  2. JSWSERVER-20643

JMXInstrumentsLoggingService RUNNING WARN - RequestCache being used in an invalid context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Duplicate
    • Affects Version/s: 8.11.0
    • Fix Version/s: None
    • Component/s: REST API
    • Labels:
      None

      Description

      Issue Summary

      There are warnings being triggered on the latest Jira software version due to the `RequestCacheImpl` being used outside of a request thread by the `JMXInstrumentsLoggingService`. This will not work in the future, so we need to fix it.

      Steps to Reproduce

      1. Install Jira Software v8.11

      The below exception is thrown in the Atlassian-jira.log file:

      2020-07-17 13:50:05,242+0530 JMXInstrumentsLoggingService STARTING INFO      [atlassian-performance] Scheduling JMXINSTRUMENTS with poll interval of 60 seconds 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService STARTING 
      
      INFO      [atlassian-performance] all services started and healthy 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService RUNNING WARN      [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details. 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService RUNNING WARN      [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException. 2020-07-17 
      
      13:50:05,244+0530 JMXInstrumentsLoggingService RUNNING WARN      [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details. 2020-07-17 13:50:05,244+0530 JMXInstrumentsLoggingService RUNNING WARN      [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException. 2020-07-17 13:51:05,247+0530 JMXInstrumentsLoggingService RUNNING WARN      [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details.
      

      Workaround

      Tried workaround JSDSERVER-6897

      set the package to ERROR (this setting will remain after a Jira restart)

      • Edit the file <JIRA_INSTALLATION>/atlassian-jira/WEB-INF/classes/log4j.properties
      • Add the 2 following lines at the end of the file and save it:
        log4j.logger.com.atlassian.jira.cache.request.RequestCacheImpl = ERROR, filelog
        log4j.additivity.com.atlassian.jira.cache.request.RequestCacheImpl = false
        
      • Restart the Jira application

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mkhan2@atlassian.com Danish (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: