Issue
By default Windows will run the client version of the Java runtime environment. The Wowza Pro server will function better when using the server version of the Java runtime environment that ships with the Java JDK. Below are the instructions to switch to the server version of the Java runtime environment.
Resolution
-
If you have the Java runtime environment installed (rather than the Java Development Kit - JDK) then unstinstall the Java runtime environment and install the most recent version of the Sun Java Development Kit (http://java.sun.com).
-
After installation delete the following files from the C:\WINDOWS\SYSTEM32 folder:
java.exe javacpl.cpl javaw.exe javaws.exe
-
Add the path to the Java Development Kit to your system PATH variable. You can do this by doing the following:
-
Open the System Control Panel
-
Select the Advanced tab
-
Click the Environment Variables button
-
Double click the Path variable in the System variable section and add the full path the Java JDK bin folder inside the JDK folder surrounded by double quotes to the end of the list of path entries (path entries are separated by the ; character). For example, the string you add to the Path variable might look like this:
;"C:\Program Files\Java\jdk1.6.0_04\bin"
-
To test that is is working, open a command prompt and enter the following command:
java -server -version
It should return something similar to:
java version "1.6.0_04" Java(TM) SE Runtime Environment (build 1.6.0_04-b12) Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
-
With this in place you can now edit two Wowza Pro startup files to switch to the server VM.
Edit [install-dir]/bin/setenv.bat
change: set JAVA_OPTS=-Xmx768M to: set JAVA_OPTS=-server -Xmx768M
Edit [install-dir]/bin/WowzaMediaServerPro-Service.conf
change: # Java Additional Parameters wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL= wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false #wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099 #wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false #wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false #wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password" #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access" #wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7 to: # Java Additional Parameters wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL= wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false wrapper.java.additional.7=-server #wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099 #wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false #wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false #wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password" #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access" #wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7
Note: If you have uncommented some of these entries to turn on the JMX interface then you need to make sure the entries remain numbered in serial order. So if you have uncommented all of these entries then you need to add the server entry to the end of the list like this:
# Java Additional Parameters wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%" wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%" wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL= wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099 wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password" wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access" wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7 wrapper.java.additional.13=-server
Charlie