java -version command fails on RHEL 6.4 with message "Could not reserve enough space for object heap"

Solution Verified - Updated -

Issue

  • The comand java -version on RHEL 6.4 fails with
 Error occurred during initialization of VM
 Could not reserve enough space for object heap
 Error: Could not create the Java Virtual Machine.
 Error: A fatal exception has occurred. Program will exit.

After a system reboot, the issue goes away, but returns randomly at a later time.

  • Running the command java -server -Xms512m -Xmx1190 on a 32 bit OS fails with
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

The memory limit for -Xmx is random and should be tested on a case-by-case basis.

  • After updating our RH6 with the last erratas, tomcat6 is unable to start.
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Environment

  • Red Hat Enterprise Linux (RHEL) 6.4
    • kernel 2.6.32-358.11.1.el6 or later
  • OpenJDK 1.6/1.7
  • Oracle JDK/JRE 1.6/1.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content