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

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

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:

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

(info) 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:
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.

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 this documentation.

  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. (info) 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.


Last modified on Aug 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.