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.

Weird (permission?)issues with java

Discussion in 'General Discussion' started by fusioncroc, Dec 27, 2005.

  1. fusioncroc

    fusioncroc Well-Known Member

    Joined:
    Sep 28, 2004
    Messages:
    261
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    U.K.
    Hi,
    When I run java from any user account it fails with the following:
    Code:
    curtis@server2 [/]# java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    
    However running it from root works fine:
    Code:
    root@server2 [/]# java -version
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
    
    I have tried multiple versions of Java JRE and JDK 1.5 (1.5.0 and all updates)
    I have not tested 1.4 though, as the application I am trying to run from a user account requires 1.5
    I have searched around but have not found a solution to this, I did have a feeling it was due to ulimit... in /etc/profile and /etc/bashrc but I am not sure.
    It works perfect on by Debian Sarge box though, in root and normal users.
    But I cannot run the application on that one.

    I did try both the .bin and .bin.rpm files by the way.
    I am running CentOS 3.6, 2.4.21-32.0.1.ELsmp
    JAVA_HOME is set and I have also tried running it from the full path, to no avail.

    Any help would be appricated a lot, thank you :)

    P.S I was not sure whether to post in here or Addons, but I thought it was more suited here... mods feel free to move if you want.
     
  2. wzd

    wzd Well-Known Member

    Joined:
    Dec 16, 2005
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    hey fusioncroc

    It is a known fact that 32bit architectures limit the amount of memory any single process can allocate to 4GB. When you try to run your JVM with a -Xmx2gb flag, you'll get the error you're experiencing. This is however, ONLY a limitation of the Windows 32bit OS. 32bit processes can only use a max of 4GB memory address space. Windows further splits that into half by allocating 2GB to the kernel and 2GB to the application. :(
    See here

    Permsize explained

    HOWEVER, for your problem ths is the best advice i could seem to find. Investigate this and keep us updated. :cool:



    Good luck :) :)
     
  3. fusioncroc

    fusioncroc Well-Known Member

    Joined:
    Sep 28, 2004
    Messages:
    261
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    U.K.
    Thanks, I will try that when I wake up in the morning.
    Lucky that it is not a serious thing to be fixed, otherwise I would be up all night :rolleyes:
     
  4. wzd

    wzd Well-Known Member

    Joined:
    Dec 16, 2005
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    Yeah i know the feeling. it's 4am. Coffee is wearing off and i have clients to meet tomorrow. :eek:

    Give that a go and let me know how it goes. I'll see what i can find meanwhile. :)
     
  5. fusioncroc

    fusioncroc Well-Known Member

    Joined:
    Sep 28, 2004
    Messages:
    261
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    U.K.
    I've noticed something else.
    When I do java -version from root there is no 'sharing' line.
    However on my Debian box I see that line from root and non root users.
    Might be the issue... or what you said about /tmp and swap.
     
Loading...

Share This Page