# iNSTAL ON CENTOS

**URL:** <https://community.wowza.com/t/instal-on-centos/228>\
**Category:** Wowza Streaming Engine\
**Created:** [March 13, 2008, 8:59pm UTC](https://community.wowza.com/t/instal-on-centos/228 "2008-03-13T20:59:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [March 13, 2008, 8:59pm UTC](https://community.wowza.com/t/instal-on-centos/228/1 "2008-03-13T20:59:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [June 9, 2008, 5:01am UTC](https://community.wowza.com/t/instal-on-centos/228/2 "2008-06-09T05:01:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [June 9, 2008, 5:56pm UTC](https://community.wowza.com/t/instal-on-centos/228/3 "2008-06-09T17:56:31Z")

</div>

Excellent.

Charlie

---

<div class="post-metadata">

**Author:** ![J\_Cole](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@J\_Cole](https://community.wowza.com/u/J_Cole)\
**Post date:** [March 13, 2008, 9:33pm UTC](https://community.wowza.com/t/instal-on-centos/228/4 "2008-03-13T21:33:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [June 9, 2008, 3:52am UTC](https://community.wowza.com/t/instal-on-centos/228/5 "2008-06-09T03:52:07Z")

</div>

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:

```auto
JAVA_OPTS="-Xmx250M"

```

Charlie

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [June 9, 2008, 4:21am UTC](https://community.wowza.com/t/instal-on-centos/228/6 "2008-06-09T04:21:05Z")

</div>

What do you get when you enter:

```auto
java -version

```

You can try different VM sizes by entering:

```auto
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

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [June 9, 2008, 7:55am UTC](https://community.wowza.com/t/instal-on-centos/228/7 "2008-06-09T07:55:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [June 9, 2008, 11:49am UTC](https://community.wowza.com/t/instal-on-centos/228/8 "2008-06-09T11:49:49Z")

</div>

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](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](http://community.wowza.com/t/-/41) (windows)

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

Richard

---

<div class="post-metadata">

**Author:** ![rob\_sarroff](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rob\_sarroff](https://community.wowza.com/u/rob_sarroff)\
**Post date:** [June 9, 2008, 11:41am UTC](https://community.wowza.com/t/instal-on-centos/228/9 "2008-06-09T11:41:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob\_sarroff](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rob\_sarroff](https://community.wowza.com/u/rob_sarroff)\
**Post date:** [June 9, 2008, 12:07pm UTC](https://community.wowza.com/t/instal-on-centos/228/10 "2008-06-09T12:07:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rob\_sarroff](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rob\_sarroff](https://community.wowza.com/u/rob_sarroff)\
**Post date:** [June 9, 2008, 12:44pm UTC](https://community.wowza.com/t/instal-on-centos/228/11 "2008-06-09T12:44:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob\_sarroff](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rob\_sarroff](https://community.wowza.com/u/rob_sarroff)\
**Post date:** [June 9, 2008, 1:07pm UTC](https://community.wowza.com/t/instal-on-centos/228/12 "2008-06-09T13:07:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rob\_sarroff](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rob\_sarroff](https://community.wowza.com/u/rob_sarroff)\
**Post date:** [June 10, 2008, 12:35am UTC](https://community.wowza.com/t/instal-on-centos/228/13 "2008-06-10T00:35:03Z")

</div>

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
