"Invalid file name for use with -Xloggc" when starting Windows Service

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

Summary

When the Windows Service is installed, either manually or due a Confluence upgrade, after trying to start the service, the following message is received:

1 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 "<confluence-install-path>\logs\gc-%t.log"

Environment

Confluence running on a Windows OS.

Diagnosis

  1. Check the Windows Service Properties as well as the Windows Registry entry for the Confluence service, and look for the -Xloggc parameter

  2. Verify whether there are quotes around the path on this property, such as:

1 -Xloggc:"<confluence-install>\logs\gc-%t.log"

Cause

The -Xloggc parameter does not allow quotes around the defined path. Otherwise, it will throw the "Invalid file name for use with -Xloggc" error.

Solution

Remove any quotes from the path defined on the -Xloggc parameter. For example, change the following line:

1 -Xloggc:"<confluence-install>\logs\gc-%t.log"

To the one below:

1 -Xloggc:<confluence-install>\logs\gc-%t.log

Updated on March 12, 2025

Still need help?

The Atlassian Community is here for you.