Forum Problems Installing LAMS: Re: Re: Problem installing on a shared server


 
Search: 

3: Re: Re: Problem installing on a shared server
In response to 2 07/10/07 08:40 PM
[ Reply | Forward ]
It is an Apache server.

I am using a Mac terminal - SSH - Bash

Here is what I get for environment settings:

JAVA_HOME=jdk1.6.0_02
PATH=jdk1.6.0_02/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/local/msql/bin:/usr/games:.

I think this is correct because the jdk1.6.0_02 directory is where I installed JDK.

Here is a copy of what I get after running the command as you suggested:
u35483043:~ > java -Xmx256m -cp bin testJava
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Posted by Rod Spears

4: Re: Re: Re: Problem installing on a shared server
In response to 3 07/10/07 09:44 PM
[ Reply | Forward ]
That's interesting... it could be that instead of 'testJava' not getting enough memory, it's asking for too much (and getting denied by the OS running your shared server). If your server has >= 2 CPUs and > 2GB of ram, then running 'java -cp bin testJava' will automatically ask for a minimum amount of memory equal to a fraction of your server's total ram.

http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

Can you try running it like this:

shell> java -client -cp bin testJava

The client option by default asks for only 2MB initially. If that doesn't work, try

shell> java -Xms1m -cp bin testJava

I'm making the assumption here that your host server is a beefy machine with >= 2 CPUs and > 2GB ram. But if one of these commands works, then it may be that your host is running out of memory for your java apps (= not good for LAMS).

Posted by Jun-Dir Liew

5: Re: Re: Re: Problem installing on a shared server
In response to 3 07/10/07 09:57 PM
[ Reply | Forward ]
Bleah. There goes that theory out the window.

The JAVA_HOME and PATH aren't right - the "jdk1.6.0_02" bit needs a path in front of it. Even it if was in the root directory (which I doubt) it would be "/jdk1.6.0_02".

But I doubt that's the problem, as Java is trying to start but can't get enough memory.

And that version of Java should be fine.

Can you try issuing a few more commands for us? That might give us a clue. At the command line on the server, try the following commands and post the output:

  • uname -a
  • java -v
  • whereis java

    e.g. when I do it on one of our servers I see:

    $ uname -a
    Linux laxxxxxx 2.4.9-e.24smp #1 SMP Tue May 27 16:07:39 EDT 2003 i686 i686 i386 GNU/Linux

    $ java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

    $ whereis java
    java:

    In this case, whereis didn't find Java. Don't be worried if that happens on your server. It just goes to show that whereis doesn't always know where everything is... But it works on some servers.

    Fiona

    Posted by Fiona Malikoff

  • 6: Re: Re: Re: Re: Problem installing on a shared server
    In response to 5 07/10/07 09:59 PM
    [ Reply | Forward ]
    Sorry Rod - try JunDir's suggestion first. He was a quicker typist than me and I didn't see his response before posting.

    Fiona

    Posted by Fiona Malikoff

    7: Re: Re: Re: Re: Re: Problem installing on a shared server
    In response to 6 07/11/07 02:49 PM
    [ Reply | Forward ]
    Thanks for all the help!

    However, I finally got a response from tech support. My shared server is hosted by 1and1. They told me that the server will not support Java.

    I am not looking for an affordable service that would support it. I am communicating with them about it now to see if they offer something I can afford.

    Their Virtual Private Server may be an option. It is affordable. However, if not, the next step with them would cost too much.

    Any ideas?

    Posted by Rod Spears

    8: Re: Re: Re: Re: Re: Re: Problem installing on a shared server
    In response to 7 07/11/07 02:51 PM
    [ Reply | Forward ]
    I meant to say I am NOW looking for an affordable service.

    Posted by Rod Spears

    Reply to first post on this page
    Back to Problems Installing LAMS