Wowza Community

cannot run startup.sh : commonad not found : java

Dear Wowza team,

I have been trying to install the Wowza server on a Virtual Private server for a while now, and I still cannot start using it.

here is the VPS configuration:

Linux oilvla169 2.6.18-028stab057.4 #1 SMP Fri Aug 1 10:47:59 MSD 2008 i686 i686 i386 GNU/Linux

it is running CentOS 5 32bit

I have installed Java

(java -version returns the following)

java version “1.6.0_07”

Java™ SE Runtime Environment (build 1.6.0_07-b06)

Java HotSpot™ Client VM (build 10.0-b23, mixed mode)

but when trying to startup.sh

I get this error

Error occurred during initialization of VM

Could not reserve enough space for object heap

*** glibc detected *** free(): invalid pointer: 0xb7df6280 ***

./startup.sh: line 24: 15890 Aborted $_EXECJAVA $JAVA_OPTS $JMXOPTIONS -Dcom.wowza.wms.AppHome="$WMSAPP_HOME" -Dcom.wowza.wms.ConfigURL="$WMSCONFIG_URL" -Dcom.wowza.wms.ConfigHome="$WMSCONFIG_HOME" -cp $WMSAPP_HOME/bin/wms-bootstrap.jar com.wowza.wms.bootstrap.Bootstrap start

So, i edit setenv.sh in /usr/local/WowzaMediaServerPro/bin/

and set JAVA_OPTS="-Xmx512M"

(I see I have 672.6 MB available)

only to find the following error:

./startup.sh

: command not found:

: command not found:

: command not found:

: command not found1:

: command not found4:

: command not found8:

: command not found24: java

So I have changed

#ln -s /usr/java/jre1.6.0_07/bin/java /usr/bin/java

even tried

#ln -s /usr/java/default/bin/java /usr/bin/java

and updated setenv.sh with

_EXECJAVA=/usr/bin/java

but is still cannot find it.

I tried with JDK once and it still gave me the same error.

I would greatly appreciate your help.

Thank you very much

Best regards

Some people have had problems getting Wowza Pro to run properly on a VPS. It has to do with the way the memory works on an VPS.

Try two things. First edit [install-dir]/bin/setenv.sh and change the java command used:

from:
_EXECJAVA=java
to:
_EXECJAVA=/usr/java/jre1.6.0_07/bin/java 

Second, lower the heap size. Try editing [install-dir]/bin/setenv.sh and change the heap size to 200M.

JAVA_OPTS="-Xmx200M"

If this is still too large lower it until it starts. The problem is with this amount of heap you will not be able to handle very many concurrent connections.

Charlie

Then edit [install-dir]/bin/setenv.sh and change:

_EXECJAVA=/usr/java/jre1.6.0_07/bin/java

Charlie

Glad to hear you are getting somewhere. It did seem to be some kind of strange problem.

Charlie

Please zip up and send me your bin folder. Also, what to do you get when you execute the command:

/java/jre1.6.0_07/bin/java -Xmx20M -version

It sounds like Java is not currently installed at this path.

Charlie

Dear Charlie,

Thank you very much for your reply.

The VPS is supposed to have 704Mb and currently has 675.1Mb Free (this is what is displayed in the Power Panel) and it also says 4.11% is currently used.

I have also purchased extra burstable memory.

just tried with

_EXECJAVA=/usr/java/jre1.6.0_07/bin/java

JAVA_OPTS="-Xmx256M"

./startup.sh

: command not found:

: command not found:

: command not found:

: command not found1:

: command not found4:

: command not found8:

: No such file or directory/java/jre1.6.0_07/bin/java

is it the only error possible?

Could it be that Java hasnt been installed properly? (java -version still display the same as first post of this thread)

Is JRE better than JDK in terms of memory consumption / wowza server working?

Thanks again for your reply.

Best regards

I tried 200Mb. Even tried

JAVA_OPTS="-Xmx20M"

still displays

: command not found:

: command not found:

: command not found:

: command not found1:

: command not found4:

: command not found8:

: No such file or directory/java/jre1.6.0_07/bin/java

Could it be that the VPS I purchased (Easyspace) is simply not suited for Wowza??

(RECTIFICATION: centOS-4-x86 and not 5)

I have tried

/java/jre1.6.0_07/bin/java -Xmx20M -version

but this get me

-bash: /java/jre1.6.0_07/bin/java: No such file or directory

if I go to /usr

and type

./java/jre1.6.0_07/bin/java -Xmx20M -version

and get

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode)

sorry if this is a stupid question, but do you want the wowza or java bin folder?

Thanks a lot,

db

I am emailing you both bin folders.

Sorry Charlie,

still no luck, even with

_EXECJAVA=/usr/java/jre1.6.0_07/bin/java
./startup.sh

still displays

: command not found: 
: command not found: 
: command not found: 
: command not found1: 
: command not found4: 
: command not found8: 
: No such file or directory/java/jre1.6.0_07/bin/java

I am so very sorry for wasting your time…

the text editor of the online control panel was saving the file in another format without my knowledge (I assume not binary).

I have just reinstalled the wowza server with original files, got the heap size error,

went on FUGU (ssh tunneling application for Mac)

and changed the path and memory in setenv.sh

for the first time I can see the query for serial number.

I havent got further, but I just wanted to let you know!

Finally getting somewhere…

Thanks a lot and sorry again for the troubles…

Best regards

To anyone insterested.

I installed Wowza Media Server Pro (10 seat dev edition) on my DVS (Dedicated Virtual Server), that is running 2GB Ram, Linux Version 2.6.9-023.6.9-023stab048.6-enterprise, Red Hat 3.4.5-2.

Installing Wowza

  1. Logged into the server via Terminal on the Mac (if your using Fugu, I would just stop this is so much easier).
  1. Once logged in, I like to go root
  • su

  • Password: your_root_password

  1. Get to the base of your system.
  • cd /
  1. Now I typically create a installations file within the /usr/ directory, so this is simple.
  • cd /usr/

  • mkdir installations

  1. Open up write capabilities and step into the folder
  • chmod 777 installations

  • cd installations

  1. From the folder, get the newest Wowza Binary
  • wget (full link to binary)
  1. Once you have the binary, make sure you open it up to the system

chmod +x (Wowza_Binary.rpm.bin) where () are indicating your install binary file you shouldn’t add them

  1. ./Wowza_Binary.rpm.bin

  2. You have to read through the terms and agreements, that is fine, press the space bar to move down in the terminal and read to the bottom.

  3. say ‘yes’ and agree to the license agreement.

  4. You should now have Wowza Installed at:

/usr/local/WowzaMediaServerPro

Sweet right, your almost there.

Java Dependencies

Java >= 5 needs to be installed on your server, if you don’t have it, you have to go to http://java.sun.com/javase/downloads

*make sure you know your system information for your Linux distribution

(to find this you can use cat /proc/version)

*Read the requirements for your Wowza Installation, you may need JRE 6, but I just needed 5.

  1. Download the JRE 5 environment (SE) with JDK.

  2. Upload this to your server, and then mv the file to your ‘installations’ folder. (This is to keep things orderly on your server, you can keep it wherever you want)

  3. Make the binary file open to the system. chmod 777 java_version.rpm.bin

  4. Install Java JRE5 and JDK

./java_version.rpm.bin

  1. Once you are done with this you will have all the dependencies resolved and you will be ready to add your serial number.

Adding your Serial Number

Next is simple. Just move to the Wowza Server bin and add your serial number.

cd /usr/local/WowzaMediaServerPro/bin

chmod 777 startup.sh

./startup.sh (alternatively you can use sh startup.sh)

This will prompt your serial number, so check your email, or text file where you stored this, enter it, and your all set.

I hope this helps get people going with the service.

Cheers,

Scott Haines

Newfront Creative

San Jose, CA

http://www.newfrontcreative.com