Wowza Community

Wowza doesn't start at boot

Hi,

after i followed this guide: https://www.wowza.com/docs/how-to-run-wowza-streaming-engine-as-a-named-user-linux-and-os-x

Wowza doesn’t start at boot, but if i start manually startup script everything goes well.

This is my boot.log file:

Starting sshd:                                             [  OK  ]
Starting ntpd:                                             [  OK  ]
Starting postfix:                                          [  OK  ]
	WowzaStreamingEngine stopped
	WowzaStreamingEngine: starting...
        WowzaStreamingEngine stopped                       [  OK  ]
	WowzaStreamingEngineManager stopped
	WowzaStreamingEngineManager: starting...
        WowzaStreamingEngineManager stopped                [  OK  ]
Starting crond:                                            [  OK  ]

Any suggestion?

Hi

Is it possible for you to include a copy of any scripts you have modified from the default?

Also can you let me know what flavor of Linux (I’m guessing from your output) you are on, and also what run-level are you on (who -r will show you this).

Thanks

Paul

That’s great news, thanks for the update and let us know if we can assist you in the future.

Salvadore

Hi

Thanks for these. One thing that is immediately apparent is that you don’t have all of the parameters for the sudo command in your /usr/local/WowzaStreamingEngine/bin/startup.sh.

You have:

sudo -u wowza $_EXECJAVA $WMSTUNE_OPTS $JMXOPTIONS -Dcom.wowza.wms.runmode="$mode" -Dcom.wowza.wms.native.base="linux" -Dcom.wowza.wms.AppHome="$WMSAPP_HOME"$

The example here is this:

sudo -u wowza $_EXECJAVA $WMSTUNE_OPTS $JMXOPTIONS -Dcom.wowza.wms.runmode="$mode" -Dcom.wowza.wms.native.base="linux" -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

Looks like some of it may have got trimmed when you copied and pasted.

Paul

Hi

OK, thanks for these. I’ll take a closer look and get back to you as soon as I can.

Paul

Hi

We have identified an issue which may be directly related to the problems you are seeing. Once we have completed testing we will be publishing an updated article on this.

Regards

Paul

any news?

Hi ffalica. Thanks for your patience and for reporting this originally. We now have an updated article which we believe addresses the issue. The additional steps introduced are at 3[g] and 3[h].

Regards

Paul

Hi Paul, many thanks for your quick reply.

I’m using CentOS 6.4 x64

# uname -a
Linux myfido01 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

run-level

# who -r
run-level 3  2014-05-02 15:12

/usr/local/WowzaStreamingEngine/bin/startup.sh

#!/bin/bash
# check for root access. If not, put up message and exit
#if [ "$(/usr/bin/id -u)" -ne "0" ] ; then
#    echo "The Wowza Streaming Engine requires root access to start. Please run script again using sudo."
#    exit
#fi
. ./setenv.sh
mode=standalone
if [ "$#" -eq 1 ];
then
mode=$1
fi
#chmod 600 ../conf/jmxremote.password
#chmod 600 ../conf/jmxremote.access
# NOTE: Here you can configure the JVM's built in JMX interface.
# See the "Server Management Console and Monitoring" chapter
# of the "User's Guide" for more information on how to configure the
# remote JMX interface in the [install-dir]/conf/Server.xml file.
JMXOPTIONS=-Dcom.sun.management.jmxremote=true
#JMXOPTIONS="$JMXOPTIONS -Djava.rmi.server.hostname=192.168.1.7"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.port=1099"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.authenticate=true"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.ssl=false"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.password.file=$WMSCONFIG_HOME/conf/jmxremote.password"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.access.file=$WMSCONFIG_HOME/conf/jmxremote.access"
ulimit -n 20000 > /dev/null 2>&1
rc=144
while [ $rc -eq 144 ]
do
WMSTUNE_OPTS=`$WMSAPP_HOME/bin/tune.sh $mode`
# log interceptor com.wowza.wms.logging.LogNotify - see Javadocs for ILogNotify
sudo -u wowza $_EXECJAVA $WMSTUNE_OPTS $JMXOPTIONS -Dcom.wowza.wms.runmode="$mode" -Dcom.wowza.wms.native.base="linux" -Dcom.wowza.wms.AppHome="$WMSAPP_HOME"$
rc=$?
done

/usr/local/WowzaStreamingEngine/bin/wms.sh

#!/bin/bash
# NOTE: Here you can configure the JVM's built in JMX interface.
# See the "Server Management Console and Monitoring" chapter
# of the "User's Guide" for more information on how to configure the
# remote JMX interface in the [install-dir]/conf/Server.xml file.
JMXOPTIONS=-Dcom.sun.management.jmxremote=true
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.port=1099"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.authenticate=true"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.ssl=false"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.password.file=$WMSCONFIG_HOME/conf/jmxremote.password"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.access.file=$WMSCONFIG_HOME/conf/jmxremote.access"
#JMXOPTIONS="$JMXOPTIONS -Djava.rmi.server.hostname=192.168.1.7"
if [ "$WMSCOMMAND" != "start" ]; then
        JMXOPTIONS=""
fi
ulimit -n 20000
rc=144
while [ $rc -eq 144 ]
do
WMSTUNE_OPTS=`$WMSAPP_HOME/bin/tune.sh $mode`
# log interceptor com.wowza.wms.logging.LogNotify - see Javadocs for ILogNotify
sudo -u wowza $_EXECJAVA $WMSTUNE_OPTS $JMXOPTIONS -Dcom.wowza.wms.runmode="service" -Dcom.wowza.wms.native.base="linux" -Dcom.wowza.wms.AppHome="$WMSAPP_HOM$
PID=$!
if [ "$WMSCOMMAND" = "start" ]; then
    while [ -z "$WOWZA_PID" ]
    do
      	WOWZA_PID=$(ps --no-headers -o pid --ppid $PID)
    done
    echo $WOWZA_PID > ${WMSPIDFILE}
    wait $!
fi
rc=$?
if [ $rc -eq 10 ] ; then
        sudo -u wowza $_EXECJAVA -cp "$WMSAPP_HOME/lib/slf4j-api-1.6.4.jar:$WMSAPP_HOME/lib/slf4j-log4j12-1.6.4.jar:$WMSAPP_HOME/lib/wms-xstream-1.4.5.jar:$W$
        rc=$?
fi
done
if [ "$WMSCOMMAND" = "start" ] ; then
WMSBASE_NAME=WowzaStreamingEngine
WMSLOCK_FILE="/var/run/$WMSBASE_NAME"
if test -w "/var/lock/subsys" ; then
WMSLOCK_FILE="/var/lock/subsys/$WMSBASE_NAME"
fi
echo $WMSLOCK_FILE > /tmp/enc.txt
rm -f $WMSLOCK_FILE
fi
exit 0

/usr/local/WowzaStreamingEngine/manager/bin/startmgr.sh

#!/bin/bash
# NOTE: Here you can configure the JVM's built in JMX interface.
# See the "Server Management Console and Monitoring" chapter
# of the "User's Guide" for more information on how to configure the
# remote JMX interface in the [install-dir]/conf/Server.xml file.
export _EXECJAVA=java
if [ -d /Library/WowzaStreamingEngine ]
then
    	# OS X
	export WMSMGR_HOME=/Library/WowzaStreamingEngine/manager
else
    	# Linux
        export WMSMGR_HOME=/usr/local/WowzaStreamingEngine/manager
        ulimit -n 20000
fi
JMXOPTIONS=-Dcom.sun.management.jmxremote=true
#JMXOPTIONS="$JMXOPTIONs
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.authenticate=true"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.ssl=false"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.password.file=$WMSCONFIG_HOME/conf/jmxremote.password"
#JMXOPTIONS="$JMXOPTIONS -Dcom.sun.management.jmxremote.access.file=$WMSCONFIG_HOME/conf/jmxremote.access"
#JMXOPTIONS="$JMXOPTIONS -Djava.rmi.server.hostname=192.168.1.7"
BACKGRND=" > /dev/null"
RUNCMD="`which nohup` "
if [ "$WMSMGRCOMMAND" != "start" ]; then
        JMXOPTIONS=""
fi
rc=0
#while [ $rc -eq 0 ]
#do
# log interceptor com.wowza.wms.logging.LogNotify - see Javadocs for ILogNotify
CMD="$_EXECJAVA -Dcom.wowza.wms.ConfigURL=\"\" -Dcom.wowza.wms.ConfigHome=$WMSMGR_HOME -Djava.io.tmpdir=$WMSMGR_HOME/temp -Dlog4j.configuration=file://$WMSMG$
        if [ "$WMSMGRCOMMAND" = "start" ]; then
           $RUNCMD sudo -u wowza $CMD $BACKGRND &
        else
           sudo -u wowza $CMD
        fi
PID=$!
rc=$?
if ! [ -d /Library/WowzaStreamingEngine ]
then
    	# Linux
        if [ "$WMSMGRCOMMAND" = "start" ]; then
                while [ -z "$WOWZA_PID" ]
                do
                  	WOWZA_PID=$(ps --no-headers -o pid --ppid $PID)
                done
                echo $WOWZA_PID > ${WMSMGRPID_FILE}
                wait $PID
        fi
	if [ "$WMSMGRCOMMAND" = "start" ] ; then
                WMSMGRBASE_NAME=WowzaStreamingEngineManager
                WMSMGRLOCK_FILE="/var/run/$WMSMGRBASE_NAME"
                if test -w "/var/lock/subsys" ; then
                        WMSMGRLOCK_FILE="/var/lock/subsys/$WMSMGRBASE_NAME"
                fi
                echo $WMSMGRLOCK_FILE > /tmp/enc.txt
                rm -f $WMSMGRLOCK_FILE
        fi
	serviceName=$WowzaMGRVersion
#	service $serviceName stop >/dev/null
fi
#done
exit 0

Hi Paul, i apologize, it’s just copy/paste error.

These are correct files:

https://www.dropbox.com/sh/5jkeo9oiyocofiu/YTFGrJbvCg

Many thanks, i’m waiting for news.

please send me the link to the article when you find a solution

any news?

Hi ffalica. Thanks for your patience and for reporting this originally. We now have an updated article which we believe addresses the issue. The additional steps introduced are at 3[g] and 3[h].

Regards

Paul

Sorry if I reply late. I had not seen your response.

I solved my problems. thanks