VPS - JAVA JDK Help

allofus

New Member
Messages
183
Reaction score
2
Points
0
Hi,

I have been trying for a few days to get Java JDK installed on our newly acquired VPS on x10hosting.com.

I have the VPS configured with centOS-5 'hostinabox' (lxadmin).

I have tried several times to install Java JDK.

I want to run the 'open source' red 5 server to allow for web interface audio / video chat as appose to visitors having to install and configure a client like ventrilo or mumble.

red 5 is a java based server which also is dependent on ant-apache.


The trouble I am having is that when I install all seems well, but when I go to run the red5 server I get a java error/s that all seem to be related to 'memory' and or 'swap files'.

With the Operating System and Ventrilo running (fine) 20mb of the 128mb of ram is used.

The package we have is;

x10 VPS Tiny - Comes with CentOS 5 by default. Other OS options are available.
Disk Space: 10 GB
Transfer: 75 GB
1 IP Address
128 MB Guaranteed RAM
196 MB Burstable RAM
Fair Share CPU
HyperVM Access


I am not sure if the 128mb of ram is not enough to run Java JDK, maybe it isn't? but I am also not aware if there is a compatibility issue with the VPS and java due to no 'swap file'?

I have got to the end of my teather with this one and have read soooo many 'how to' guides, followed several different methods for install and still no joy.

So now here I am asking for help. If you have the same VPS package running Java, how? If you know that it is not compatible, why? ram enough? what of the next level up, 256mb?

Please advise,

Respectfully,
MattG
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
You might be better off submitting a ticket. I don't think many users in here will be familiar with the VPS service.
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
The VPS service is 'un-supported'.

Therefore I can do with the VPS as I please, but it is up to me to figure out how to do it.

I thank you for your help!
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
Oh, sorry, I didn't know that.

I can't find any information about why the JDK would or would not need the swap. It does seem that there is two versions. The first requires root access and the second is a standalone version that does not change the root installation (if it exists) of any other java software.

My question would be, which version do you have?

I think if you have the root version, you will have a problem because you don't have root access. If you have the standalone version, you might accidentally be accessing a pre-existing root install of another java product, which your access is limited to.

I'm not too familiar with this specific product, but those two problems come to mind. Hope this helps!
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
I think if you have the root version, you will have a problem because you don't have root access.
allofus does have root access as it is his VPS.

Brandon would be the person to ask about this as he is the most familiar with the VPS system. Even though the VPS service is unmanaged I don't think he would mind toomuch giving you a few pointers.

Allofus, I will try and point Brandon towards this thread for you.
 
Last edited:

javajenius

New Member
Messages
258
Reaction score
0
Points
0
Ok, the answer is yes, you can run your program on a vps with 128mb.

Some information:
I've run java on a vps with 64mb, and it should be just fine with 128mb. Since the vps provides root access, you dont need to be worried about permissions. Im not sure if you have to install the JDK or the JRE, but either will still work.

Here are instructions to installing red5 on a linux server: http://osflash.org/red5/help

If you have any other questions/problems while installing it, feel free to ask.


Go java. Lol.


EDIT: If you have problems with swap, java might be using too much memory.
Type in "java -Xmx64m"

Look at these links:
http://www.devdaily.com/blog/post/java/java-xmx-xms-memory-heap-size-control/
http://forums.vpslink.com/linux/1327-java-could-not-reserve-enough-space-object-heap-3.html

Im not sure if the VPS on x10 are capable of swap. Not sure what software they're running. Good Luck.
 
Last edited:

allofus

New Member
Messages
183
Reaction score
2
Points
0
Thanks guys,

I will take another look at this,
YES I do have root and YES java does install.

When I do
java -version
I get the desired output, as with ant -v
but try to run red5 and the mem issue arises.

Is likely a configuration issue since you have managed java in a 64 mb environment, which reminds me, it might be the environment variables that I am not getting right.

OK,
I shall follow the links provided to me in this thread over the next day or so, see what light they may shed. I have to say I have already followed several seemingly good step-by-step tutorials and got the same darned result at the end.

At least now I know that the issue is not 1 of ram....


I will feedback here when I have tried again, let it be known where it went 'right' or 'wrong' for that matter.

Anyway there is no rush!
Edit:
SIDE NOTE:
I do know from previous use of the 'support ticket system' that my questions would be answered but I figured if these questions are answered here in the forums it will be of benefit to the many in future, that and I am not constantly pestering the x10 staff with help configuring my 'new toy'.
 
Last edited:

javajenius

New Member
Messages
258
Reaction score
0
Points
0
You dont need to use the "java -Xmx64m" command i told you to use, java runs on my vps and uses under 15Mb.

Red5 is a bit complicated to use, but im sure you'll get it up and running in no time.

Try: http://www.red5tutorials.net/ , look at the tutorials and how-to's.


Good Luck.
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
Code:
-bash-3.2# ./red5.sh
Starting Red5...
Exception in thread "main" java.lang.OutOfMemoryError
        at java.util.zip.Inflater.init(Native Method)
        at java.util.zip.Inflater.<init>(Inflater.java:81)
        at java.util.zip.ZipFile.getInflater(ZipFile.java:267)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:212)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)
        at java.util.jar.JarFile.hasClassPathAttribute(JarFile.java:463)
        at java.util.jar.JavaUtilJarAccessImpl.jarFileHasClassPathAttribute(JavaUtilJarAccessImpl.java:15)
        at sun.misc.URLClassPath$JarLoader.getClassPath(URLClassPath.java:899)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:300)
        at sun.misc.URLClassPath.getResource(URLClassPath.java:167)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at org.red5.server.Standalone.<clinit>(Standalone.java:43)
Java HotSpot(TM) Client VM warning: Attempt to deallocate stack guard pages failed.
Java HotSpot(TM) Client VM warning: Attempt to deallocate stack guard pages failed.
#
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 81928 bytes for Chunk::new. Out of swap space?
#
#  Internal Error (allocation.cpp:218), pid=5347, tid=2911304592
#  Error: Chunk::new
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode linux-x86)
# An error report file with more information is saved as:
# /usr/local/red/hs_err_pid5347.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted

I do not understand what it is that I am doing wrong.

I have read and read and re-read lots of guides and followed them to the 't' and all I get is 'computer says NO'.


grrrrr

Is there a simple app that utilizes java so I can test to see if it is java or red5?

Java seems easy to install, I added the jpackage-utlis also and ant-apache seems to install fine too, but I get squat to work.
Edit:
Maybe I am not using the correct distro's of java, jpackages, ant-apache, red5.

If you have red5 running, anyone which packages do you have installed plz?
 
Last edited:

allofus

New Member
Messages
183
Reaction score
2
Points
0
ha,

ok yea I will take a look.

I am actually going to rebuild the server, as in back to square 1 and then try again. This is a pain in the butt because I will have to restore all I have done so far.

Then maybe I will try again to install this, but tbh with you I am fed up of failure and want to just turn my vps into a mirror site and pretend it never existed.....


BUT,

I am a sucker for punishment.

garrettroyce,
If and WHEN I try again I will take a look at this suggestion and see if I can get a resolve, thanks.
Edit:
oh yea....
I clearly do not know what I am doing either! lol LOL lol
 
Last edited:

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
:)

I think you're really close. The things that javajenius said were listed in that java KB article, there were just a few additions. If I understand it correctly, even if you tell java that there is a limitation to how much memory it can use, other apps it loads will not and this can cause problems allocating and deallocating RAM.
 
Top