Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2004
    Location
    U.K.
    Posts
    265

    Default Weird (permission?)issues with java

    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. #2
    wzd
    wzd is offline
    Member wzd's Avatar
    Join Date
    Dec 2005
    Location
    South Africa
    Posts
    115

    Red face

    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.


    See the man page on swap, 'man swap', it's a matter of creating a file on a local disk
    with mkfile, setting the permissions on it, and running swap to add it as swap space.
    However, look at the files in /tmp, perhaps the /tmp area is clogged up with junk.
    Normally the space for /tmp files and the swap space are the same or are shared,
    so lots of /tmp files can decrease your swap space.
    If that fails, look to see who has all the swap space. Try sdtprocess if you have it,
    and click on Size to see what's the biggest process you have running.

    Good luck

  3. #3
    Member
    Join Date
    Sep 2004
    Location
    U.K.
    Posts
    265

    Default

    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

  4. #4
    wzd
    wzd is offline
    Member wzd's Avatar
    Join Date
    Dec 2005
    Location
    South Africa
    Posts
    115

    Default

    Yeah i know the feeling. it's 4am. Coffee is wearing off and i have clients to meet tomorrow.

    Give that a go and let me know how it goes. I'll see what i can find meanwhile.
    You will learn to earn death...
    Flamewave

  5. #5
    Member
    Join Date
    Sep 2004
    Location
    U.K.
    Posts
    265

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Weird WHM issues
    By dwykofka in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 11-12-2010, 02:15 PM
  2. Weird issues with wildcard sub domains
    By HH-Steven in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-10-2008, 01:22 PM
  3. Horde permission issues
    By ajishcheeran in forum E-mail Discussions
    Replies: 2
    Last Post: 08-11-2008, 07:50 AM
  4. Install Cpanel on OSX & JAVA issues...
    By cafreamoroso in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-12-2006, 10:13 AM
  5. Weird CPanel version issues
    By Snowman30 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-15-2005, 05:47 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube