Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.6.6
-
None
Description
In Java 7u76 (as well as Java 8), the -Xloggc no longer accepts filenames with a ":" in it.
In setenv.sh, Confluence uses -Xloggc with an argument calculated from "date +%F_%T" which turns into a filename containing ":":
CATALINA_OPTS="$CATALINA_OPTS -Xloggc:$LOGBASEABS/logs/gc-`date +%F_%T`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M"
According to the Java change:
http://bugs.java.com/view_bug.do?bug_id=7164841
New solution is, we parameterize the input file name for -Xloggc:<filename>, filename is restricted for characters '[A-Z][a-z][0-9][.][-][_]', it only restricts filename not path.
In my instance, I changed it to:
CATALINA_OPTS="$CATALINA_OPTS -Xloggc:'$LOGBASEABS/logs/gc-%t.log' -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M"
However, the %t only works in Java 7u76 and Java 8. To maintain portability with earlier versions, you might explicitly expand the "date +%T" to use "hh_mm_ss" or some such expansion.
Technically, this might not be a bug. But, due to Java behaviour changing with 7u76, the existing Confluence implementation no longer works out of box with Java 7, which makes it a bug "after the fact". If you think another issue type is appropriate based upon Atlassian policy, that's fine, as long as this does get fixed...
Attachments
Issue Links
- causes
-
CONFSERVER-33772 JDK 1.8 support for confluence
- Closed