iNSTAL ON CENTOS

Hello, first the JAVA install well on Fedora_8.

An using Centos_5 and i install Java

]# ./startup.sh

Error parsing VHosts.xml (file:///usr/local/WowzaMediaServerPro/conf/VHosts.xml):

java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.w3c.dom.NodeList

java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.w3c.dom.NodeList

at com.wowza.wms.bootstrap.Bootstrap.getServerInfo(Bootstrap.java:496)

at com.wowza.wms.bootstrap.Bootstrap.startServer(Bootstrap.java:238)

at com.wowza.wms.bootstrap.Bootstrap.main(Bootstrap.java:47)

Exception in thread “main” java.lang.NoClassDefFoundError: com.wowza.wms.server.Server

at java.lang.Class.initializeClass(libgcj.so.7rh)

at java.lang.reflect.Method.invoke(libgcj.so.7rh)

at com.wowza.wms.bootstrap.Bootstrap.startServer(Bootstrap.java:246)

at com.wowza.wms.bootstrap.Bootstrap.main(Bootstrap.java:47)

Caused by: java.lang.ClassNotFoundException: java.util.concurrent.Executor not found in java.net.URLClassLoader{urls=[file:/usr/local/WowzaMediaServerPro/lib/wms-core.jar,file:/usr/local/WowzaMediaServerPro/lib/log4j-1.2.14.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-bootstrap.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-mediareader-flv.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-ant.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-mediareader-mp3.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-server.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-jlayer.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-stream-record.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-mediawriter-flv.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-stream-live.jar,file:/usr/local/WowzaMediaServerPro/lib/jid3lib-0.5.4.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-commons-modeler.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-stream-shoutcast.jar,file:/usr/local/WowzaMediaServerPro/lib/wms-stream-file.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/WowzaMediaServerPro/bin/wms-bootstrap.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}

at java.net.URLClassLoader.findClass(libgcj.so.7rh)

at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

at java.lang.ClassLoader.loadClass(libgcj.so.7rh)

at java.lang.Class.initializeClass(libgcj.so.7rh)

…3 more

When I do this

]# /usr/sbin/alternatives --config java

There are 2 programs which provide ‘java’.

Selection Command


  • 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
  • 2 /usr/java/jre1.6.0_02/bin/java

Enter to keep the current selection[+], or type selection number: 2

[root@ns6 bin]# java -version

-bash: /usr/bin/java: No such file or directory

[root@ns6 bin]# ./startup.sh

./startup.sh: line 24: java: command not found

But if I used 1 this got the old version

1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java

*+ 2 /usr/java/jre1.6.0_02/bin/java

Enter to keep the current selection[+], or type selection number: 1

[root@ns6 bin]# java -version

java version “1.4.2”

Any idea.

Many folks have had problems with virtual private servers and running Java applications. The virtualization system that runs many of these servers just can’t allocate a large enough contiguous block of memory to start Java applications.

Charlie

Excellent.

Charlie

Hello, I got the java to work

[root@ns6 bin]# JAVA_HOME=/usr/java/default; export JAVA_HOME

[root@ns6 bin]# PATH=$JAVA_HOME/bin:$PATH; export PATH

[root@ns6 bin]# java -version

java version “1.6.0_04”

JC

How much memory is in the machine or is it a virtual private server? It sounds like the heap size is too large for your hardware. Try lowering the heap size defined in /usr/local/WowzaMediaServerPro/bin/setenv.sh:

JAVA_OPTS="-Xmx250M"

Charlie

What do you get when you enter:

java -version

You can try different VM sizes by entering:

java -version -Xmx150M

Lower this number until it returns the version number. With 1GB of RAM you should be able to have a heap size of at least 250GB. What else do you have running on this machine? Is it a virtual private server? What is the OS, Java version, describe the hardware.

Charlie

I am not sure about Windows VPS. I don’t know of any customers that are using Wowza Pro on a Windows VPS. The RAM upgrade will probably help.

Charlie

How much memory is available on the machine you installed Wowza?

Have you looked at these links?:

General Tuning

https://www.wowza.com/docs/how-to-do-performance-tuning&highlight=java+version

More Tuning, Running the Server Java VM

http://community.wowza.com/t/-/41 (windows)

http://community.wowza.com/t/-/44 (linux)

Richard

After completing the solution I get

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine

any thoughts

Thanks

Thanks for the quick reply rrlanham. Oh!..it seems that I am only running 768M and I did know the min in 1GB.

Short of adding more can it run with less than 1GB.

…and Charlie

I tried # JAVA_OPTS=“Xmx250M” and still the same error.

I’m running

LINUX VPS Centos 5

32-bit jre1.5.0_15

768M RAM

java -version returns

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine

java -version -Xmx150M returns same error

java -version -Xmx50M returns same error

I think I may have to go straight to Dedicated. I was hoping to do some testing before taking that leap. I will try and get a RAM upgrade.

If I was to use a Windows VPS would it make any difference?

Thanks Charlie.

Thanks for all the help. I just upgraded the guaranteed VPS RAM to 1024 it now works and streaming like a champion. Very happy.

Cheers

Rob