The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

JAVA VM Cannot be Initialized

Discussion in 'General Discussion' started by navmonkey, Nov 12, 2005.

  1. navmonkey

    navmonkey Well-Known Member

    Joined:
    Aug 19, 2003
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    After upgrade to the laest STABLE release 10.8.3.-s31, my existing JAVA SDK and runtime fail to start. When I try to initialize a java VM, I got the following error.

    Code:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    I have disable "Shell Fork Bomb Protection" in WHM but this doesn't resolve the problem.

    Please provide assistance as I need to have my JAVA apps reactivated. Thank you.
     
  2. LBJ

    LBJ Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    G'day Navmonkey,

    Did you find a solution to this problem?

    I've just installed JRE and have the same issue. I'm guessing it's something incredibly simple, but I haven't found it yet.

    Best Regards,

    LBJ
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    This is a common issue with JVM in a VPS. Try increasing the memory using the -Xms and -Xmx options. If that doesn't work, use alias:
    alias java='java -Xms32m -Xmx128m'
     
  4. LBJ

    LBJ Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Thanks AndyReed, but that doesn't actually solve the problem.

    [~]# java -Xms32m -Xmx96m
    Error occurred during initialization of VM
    Could not reserve enough space for object heap

    Unless the virtual memory for the user is set to above 210000, java fails no matter how the -Xm parameters are set.

    I intitially thought I could just modify /etc/profile to ulimit up the virtual memory for the specific user, but that just results in...

    ulimit: virtual memory: cannot modify limit: Operation not permitted

    I then thought I could up the hard limit within /etc/security/limits.conf, but that doesn't appear to support a control for virtual memory.

    I've temporarily disabled Shell Fork Bomb Protection to simplify things, but still can't find where to modify the virtual memory for a non root user.

    Best Regards,

    LBJ
     
Loading...

Share This Page