Assets Import and Automation logs are not writing after the upgrade in Jira Data Center.
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Assets import logs and automation logs, located in the JIRA_HOME\log directory, are no longer being written after updating Jira to a version higher than 5.5.0.
Environment
Jira Service Management Server/Data Center on any version from 5.5.0.
Diagnosis
Diagnosis for Root cause 1
Go to the page ⚙ > System > System Info, scroll to the section JVM Input Arguments and check if the 4 JVM parameters below are listed in that section:
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false
If they are missing, then the Root Cause 1 is relevant and you can move on to the Resolution section for this root cause.
Diagnosis for Root cause 2
- The Jira application is running on a Windows Server
- The Jira service management application is on a version from 5.5.0, but lower than 5.11.0
Cause
Root cause 1 - Missing JVM argument (for both Linux and Windows Servers)
Log4J has been updated to version 2.x on Jira 9.5.x and new JVM arguments have been included by default in the setenv.sh and setenv.bat files coming from fresh Jira installations:
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false
Jira admins performing system updates or upgrades might rollover changes included by default in these files if they replace the file without manually adding their customizations. If these new arguments are missing, the symptoms described in this article will be observed.
Root cause 2 - Jira bug (for Windows Server only)
There is a known Jira bug that causes the import log not writing when Jira is running on a Windows Server, which is tracked in the link below:
JSDSERVER-12452 - JSM >= 5.5 is not writing ServiceDesk and Insight/Assets logs in Windows Closed
Note that this bug is no longer observed on Jira versions from 5.11.0
Solution
Solution for Root Cause 1
To solve the problem you need to add back the 4 JVM Startup parameters listed below by following the steps describe on how to set Java properties and options on startup for Jira.
-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false
It's necessary to make this change to each Jira node in case of a cluster and to restart all the nodes to make the change effective.
Solution for Root Cause 2
Upgrade the Jira service management application to 5.11.0 or any higher version.