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.

Tomcat not working

Discussion in 'Security' started by samba, Dec 22, 2006.

  1. samba

    samba Registered

    Joined:
    Oct 12, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have installed tomcat on my Linux VPS server. I can not run JVM on my server. Jsp page can not work. I have received following error while running javac command. i have installed tomcat from the WHM but it is not working.

    root@host [/usr/local/jakarta/tomcat/bin]# javac
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.

    Please update me. Its urgent.

    Thanks,
     
  2. samba

    samba Registered

    Joined:
    Oct 12, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I am using below mantioned linux OS.


    Linux version 2.6.9-022stab078.21-enterprise (Red Hat Linux 3.3.3-7))
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Sounds like you don't have enough RAM available in your VPS, thus preventing the JVM from starting. HOw much RAM does your account have?
     
  4. plexihosting

    plexihosting Member

    Joined:
    Dec 16, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    if you have limited RAM, you could create a setenv.sh file that gets loaded by the Tomcat startup script. Just Google it for the heap-related flags you can set. Though the default is typically 64MB and I wouldn't suggest going much lower than that so you might want to get more physical RAM.
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Seconded. I've seen some really cheap VPS accounts places that only provide 64 MB of RAM. If that is all you have, your best option is to upgrade to at least 128 MB (though I recommend higher) and tweak the JVM runtime parameters, whether in the setenv script or the jsvc loader.
     
  6. plexihosting

    plexihosting Member

    Joined:
    Dec 16, 2006
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Also, setenv will let you set the garbage collection parameters but on a low-end system you might want to stick to the defaults there too (until you upgrade)

    EDIT: Please also note that enabling Shell Fork Bomb protection could also cause this.
     
    #6 plexihosting, Dec 26, 2006
    Last edited: Dec 27, 2006
Loading...

Share This Page