Invalid file name for use with -Xloggc

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

Problem

Starting Confluence results in the following error log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 E:\jira\atlassian-confluence-5.7.1\bin>start-confluence.bat /fg 7 周日./0./1_19.11.41 70周日.-0.-1_19.11.41 If you encounter issues starting up Confluence, please see the Installation guid e at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide Using CATALINA_BASE: "E:\jira\atlassian-confluence-5.7.1" Using CATALINA_HOME: "E:\jira\atlassian-confluence-5.7.1" Using CATALINA_TMPDIR: "E:\jira\atlassian-confluence-5.7.1\temp" Using JRE_HOME: "D:\jdk1.7.0_79" Using CLASSPATH: "E:\jira\atlassian-confluence-5.7.1\bin\bootstrap.jar;E:\jira\atlassian-confluence-5.7.1\bin\tomcat-juli.jar" Invalid file name for use with -Xloggc: Filename can only contain the characters [A-Z][a-z][0-9]-_.%[p|t] but it has been E:\jira\atlassian-confluence-5.7.1\bin\..\logs\gc-70周日.-0.-1_19.11.41.log Note %p or %t can only be used once Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

Cause

Presence of illegal characters in the atlassian_timestamp, specified in ConfluenceInstall/bin/setenv.bat, for non-English OS. Example:

1 set atlassian_timestamp=%DATE:~-4%.%DATE:~4,2%.%DATE:~7,2%_%TIME:~0,2%.%TIME:~3,2%.%TIME:~6,2%

OS with Chinese language, for example, will return %DATE in Chinese characters, thus causing the issue

Workaround

A few workarounds exist:

  • Change the atlassian_timestamp in the ConfluenceInstallation/bin/setenv.bat (if you are starting up Confluence via Windows' start-confluence.bat ) to this:

1 set atlassian_timestamp=%DATE:~0,10%_%TIME:~0,8%

  • Remove the timestamp altogether, by changing this:

1 -Xloggc:"%atlassian_logsdir%\gc-%atlassian_timestamp%.log"

To this:

1 -Xloggc:"%atlassian_logsdir%\gc.log"

Be aware that the gc log files will overwrite on startup with this configuration, because the filename will no longer contain a unique timestamp. If you need to look at the gc logs, be sure to copy them elsewhere before restarting the application.

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.