Can't start Confluence with "Error: Could not create the Java Virtual Machine"

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

Problem

Upon attempting to run Confluence, the application appears to stall or does not properly start on the execution of the start script or service.

The following lines appears in the catalina.out file within the application:

1 2 3 Unrecognized VM option 'UseGCLogFileRotation'Error: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will exit.
1 2 3 Unrecognized VM option 'MaxMetaspaceSize=256m' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

ℹ️ The messages is just a few examples, the main catch away part is "Unrecognized VM option"followed by "Error: Could not create the Java Virtual Machine."

Diagnosis

Environment

  • Confluence

Diagnostic Steps

  • Check the installed Java version to see if your instance of Confluence uses a supported Java version:

1 java -version
  • Check you Confluence version supported platforms page to see if the java version you are using is supported.

  • Check if the java VM options set in setenv file are supported by the version you are using.

  • Check that the JAVA_HOME environment variable has been set correctly in your environment. See Installing Java for Confluence to check on your JAVA_HOME environment variable set in your system

Cause

Depending of you Confluence and Java version, you may have unsupported options set in you setenv file.

Solution

Resolution

  1. If you're not using a supported version of Java, you need to update it to a supported Java Version as per mentioned in Supported Platforms.

  2. If you haven't installed Java, you need to install it according to the steps in Installing Java for Confluence.

  3. You may need to remove the Unrecognized VM option from your setenv file. (Prefered)

  4. You can also add the the VM option "XX:+IgnoreUnrecognizedVMOptions" to your setenv file. (Not Prefered).

    1. ℹ️ This parameter allows to bypass any bad arguments being passed to Java. Add the parameter at Confluence startup to ensure that Confluence won’t fail to start due to a bad parameter.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.