Skip to content

Commit df16c33

Browse files
committed
Add JVM arguments required by Log4j 2.x from Jira 9.5
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. Missing these parameters breaks the runtime log level modification using the Logging and Profiling page. - https://support.atlassian.com/jira/kb/temporarily-changing-the-logging-level-doesnt-work-and-no-error-is-shown/ - https://jira.atlassian.com/browse/JRASERVER-62838 Fixes #459
1 parent c9fcd1b commit df16c33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/setenv.sh.epp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ JVM_CODE_CACHE_ARGS='<%= pick_default($jira::jvm_code_cache_args, $jira::config:
3838
#
3939
# The following are the required arguments for Jira.
4040
#
41-
<%- if ($jira::product != "servicedesk" and versioncmp($jira::version, '8.11.0') > 0) or ($jira::product == "servicedesk" and (versioncmp($jira::version, '4.11.0') > 0)){ -%>
41+
<%- if $jira::product != "servicedesk" and versioncmp($jira::version, '9.5.0') >= 0 { -%>
42+
JVM_REQUIRED_ARGS='-Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory'
43+
<%- } elsif ($jira::product != "servicedesk" and versioncmp($jira::version, '8.11.0') > 0) or ($jira::product == "servicedesk" and (versioncmp($jira::version, '4.11.0') > 0)){ -%>
4244
JVM_REQUIRED_ARGS='-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory'
43-
<% } else { -%>
45+
<%- } else { -%>
4446
JVM_REQUIRED_ARGS='-Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true'
4547
<%- } -%>
4648

0 commit comments

Comments
 (0)