Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Newbie's installation: Can't start FS at boot


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
dynaguy at gmail.com
Guest





PostPosted: Thu Mar 05, 2009 5:08 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

Hello,
I am a newbie to FS and I want learn it. So I setup a Centos 5.2 (fresh install) and followed the instruction on the wiki installed the new Freeswitch v1.0.3. After the installation I can start FS by issus command "/usr/local/freeswitch/bin/freeswitch".

After that I copied freeswitch.init.centos5 to /etc/init.d/freeswitch and chmod it to 755. Reboot the server and FS is not running.

If I try the start up script:
[root@localhost build]# /etc/init.d/freeswitch start
Starting freeswitch: [ OK ]
[root@localhost build]# /etc/init.d/freeswitch status
freeswitch dead but subsys locked
Did I miss somthing here? Please help. Thanks a lot.

dynaguy





Here is the copy of the origenal freeswitch.init.centos5
----------------------------

[root@localhost ~]# cat /etc/init.d/freeswitch
#!/bin/bash
#
# /etc/rc.d/init.d/freeswitch
#
# The FreeSwitch Open Source Voice Platform
#
# chkconfig: 345 89 14
# description: Starts and stops the freeswitch server daemon
# processname: freeswitch
# config: /usr/local/freeswitch/conf/freeswitch.conf
# pidfile: /usr/local/freeswitch/log/freeswitch.pid
#
# Source function library.
. /etc/init.d/functions
PROG_NAME=freeswitch
PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}
FS_USER=${FS_USER-freeswitch}
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}
FS_HOME=${FS_HOME-/usr/local/freeswitch}
LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS="-nc"
RETVAL=0
# Source options file
if [ -f /etc/sysconfig/freeswitch ]; then
. /etc/sysconfig/freeswitch
fi
# <define any local shell functions used by the code that follows>
start() {
echo -n "Starting $PROG_NAME: "
if [ -e $LOCK_FILE ]; then
if [ -e $PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then
echo
echo -n $"$PROG_NAME is already running.";
failure $"$PROG_NAME is already running.";
echo
return 1
fi
fi
cd $FS_HOME
daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
echo
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCK_FILE;
echo
return $RETVAL
}
stop() {
echo -n "Shutting down $PROG_NAME: "
if [ ! -e $LOCK_FILE ]; then
echo
echo -n $"cannot stop $PROG_NAME: $PROG_NAME is not running."
failure $"cannot stop $PROG_NAME: $PROG_NAME is not running."
echo
return 1;
fi
cd $FS_HOME
$FS_FILE -stop > /dev/null 2>&1
killproc $PROG_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE;
return $RETVAL
}
rhstatus() {
status $PROG_NAME;
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $PROG_NAME
RETVAL=$?
;;
restart)
stop
start
;;
reload)
# <cause the service configuration to be reread, either with
# kill -HUP or by restarting the daemons, in a manner similar
# to restart above>
;;
condrestart)
[ -f $PID_FILE ] && restart || :
;;
*)
echo "Usage: $PROG_NAME {start|stop|status|reload|restart}"
exit 1
;;
esac
exit $RETVAL
Back to top
dynaguy at gmail.com
Guest





PostPosted: Thu Mar 05, 2009 5:08 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

I am a newbie to FS and I want learn it. So I setup a Centos 5.2 (fresh install) and followed the instruction on the wiki installed the new Freeswitch v1.0.3.  After the installation I can start FS by issus command "/usr/local/freeswitch/bin/freeswitch".
 
After that I copied freeswitch.init.centos5 to /etc/init.d/freeswitch and chmod it to 755. Reboot the server and FS is not running.
 
If I try the start up script:

[root@localhost build]# /etc/init.d/freeswitch start
Starting freeswitch:                                       [  OK  ]
[root@localhost build]# /etc/init.d/freeswitch status
freeswitch dead but subsys locked

Did I miss somthing here? Please help. Thanks a lot.
 
dynaguy
 
 
 
 
 
Here is the copy of the origenal freeswitch.init.centos5
----------------------------

[root@localhost ~]# cat /etc/init.d/freeswitch
#!/bin/bash
#
#       /etc/rc.d/init.d/freeswitch
#
#       The FreeSwitch Open Source Voice Platform
#
#  chkconfig: 345 89 14
#  description: Starts and stops the freeswitch server daemon
#  processname: freeswitch
#  config: /usr/local/freeswitch/conf/freeswitch.conf
#  pidfile: /usr/local/freeswitch/log/freeswitch.pid
#
# Source function library.
. /etc/init.d/functions
PROG_NAME=freeswitch
PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}
FS_USER=${FS_USER-freeswitch}
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}
FS_HOME=${FS_HOME-/usr/local/freeswitch}
LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS="-nc"
RETVAL=0
# Source options file
if [ -f /etc/sysconfig/freeswitch ]; then
        . /etc/sysconfig/freeswitch
fi
# <define any local shell functions used by the code that follows>
start() {
        echo -n "Starting $PROG_NAME: "
        if [ -e $LOCK_FILE ]; then
            if [ -e $PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then
                echo
                echo -n $"$PROG_NAME is already running.";
                failure $"$PROG_NAME is already running.";
                echo
                return 1
            fi
        fi
        cd $FS_HOME
        daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE $FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
                echo
                RETVAL=$?
        [ $RETVAL -eq 0 ] && touch $LOCK_FILE;
        echo
        return $RETVAL
}
stop() {
        echo -n "Shutting down $PROG_NAME: "
        if [ ! -e $LOCK_FILE ]; then
            echo
            echo -n $"cannot stop $PROG_NAME: $PROG_NAME is not running."
            failure $"cannot stop $PROG_NAME: $PROG_NAME is not running."
            echo
            return 1;
        fi
        cd $FS_HOME
        $FS_FILE -stop > /dev/null 2>&1
        killproc $PROG_NAME
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] &&  rm -f $LOCK_FILE;
        return $RETVAL
}
rhstatus() {
        status $PROG_NAME;
}
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status $PROG_NAME
        RETVAL=$?
        ;;
    restart)
        stop
        start
        ;;
    reload)
#        <cause the service configuration to be reread, either with
#        kill -HUP or by restarting the daemons, in a manner similar
#        to restart above>
        ;;
    condrestart)
        [ -f $PID_FILE ] && restart || :
        ;;
    *)
        echo "Usage: $PROG_NAME {start|stop|status|reload|restart}"
        exit 1
        ;;
esac
exit $RETVAL
Back to top
stevecrozz at gmail.com
Guest





PostPosted: Thu Mar 05, 2009 5:33 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

Your script at /etc/init.d/freeswitch is probably not referenced
anywhere in your init sequence. You should read some documentation on
the boot process for your system, which is probably something like
this: http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-boot-init-shutdown-sysv.html

Someone else might have more specifics for you.

--Stephen

On Thu, Mar 5, 2009 at 12:19 PM, Dyna Guy <dynaguy@gmail.com> wrote:
Quote:
I am a newbie to FS and I want learn it. So I setup a Centos 5.2 (fresh
install) and followed the instruction on the wiki installed the new
Freeswitch v1.0.3.  After the installation I can start FS by issus command
"/usr/local/freeswitch/bin/freeswitch".

After that I copied freeswitch.init.centos5 to /etc/init.d/freeswitch and
chmod it to 755. Reboot the server and FS is not running.

If I try the start up script:
[root@localhost build]# /etc/init.d/freeswitch start
Starting freeswitch:                                       [  OK  ]
[root@localhost build]# /etc/init.d/freeswitch status
freeswitch dead but subsys locked
Did I miss somthing here? Please help. Thanks a lot.

dynaguy





Here is the copy of the origenal freeswitch.init.centos5
----------------------------
[root@localhost ~]# cat /etc/init.d/freeswitch
#!/bin/bash
#
#       /etc/rc.d/init.d/freeswitch
#
#       The FreeSwitch Open Source Voice Platform
#
#  chkconfig: 345 89 14
#  description: Starts and stops the freeswitch server daemon
#  processname: freeswitch
#  config: /usr/local/freeswitch/conf/freeswitch.conf
#  pidfile: /usr/local/freeswitch/log/freeswitch.pid
#
# Source function library.
. /etc/init.d/functions
PROG_NAME=freeswitch
PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}
FS_USER=${FS_USER-freeswitch}
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}
FS_HOME=${FS_HOME-/usr/local/freeswitch}
LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS="-nc"
RETVAL=0
# Source options file
if [ -f /etc/sysconfig/freeswitch ]; then
        . /etc/sysconfig/freeswitch
fi
# <define any local shell functions used by the code that follows>
start() {
        echo -n "Starting $PROG_NAME: "
        if [ -e $LOCK_FILE ]; then
            if [ -e $PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then
                echo
                echo -n $"$PROG_NAME is already running.";
                failure $"$PROG_NAME is already running.";
                echo
                return 1
            fi
        fi
        cd $FS_HOME
        daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE
$FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
                echo
                RETVAL=$?
        [ $RETVAL -eq 0 ] && touch $LOCK_FILE;
        echo
        return $RETVAL
}
stop() {
        echo -n "Shutting down $PROG_NAME: "
        if [ ! -e $LOCK_FILE ]; then
            echo
            echo -n $"cannot stop $PROG_NAME: $PROG_NAME is not running."
            failure $"cannot stop $PROG_NAME: $PROG_NAME is not running."
            echo
            return 1;
        fi
        cd $FS_HOME
        $FS_FILE -stop > /dev/null 2>&1
        killproc $PROG_NAME
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] &&  rm -f $LOCK_FILE;
        return $RETVAL
}
rhstatus() {
        status $PROG_NAME;
}
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status $PROG_NAME
        RETVAL=$?
        ;;
    restart)
        stop
        start
        ;;
    reload)
#        <cause the service configuration to be reread, either with
#        kill -HUP or by restarting the daemons, in a manner similar
#        to restart above>
        ;;
    condrestart)
        [ -f $PID_FILE ] && restart || :
        ;;
    *)
        echo "Usage: $PROG_NAME {start|stop|status|reload|restart}"
        exit 1
        ;;
esac
exit $RETVAL

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
raul at etellicom.com
Guest





PostPosted: Thu Mar 05, 2009 6:39 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

Hi, and welcome to FreeSWITCH !

You've done everything right, now you only need to tell your system to
run that init script during startup Wink
As root, do this:
chkconfig --add freeswitch
chkconfig --level 2345 freeswitch on

That's all.

Regards,

Raul

On Thu, 2009-03-05 at 13:09 -0800, dynaguy wrote:
Quote:
Hello,

I am a newbie to FS and I want learn it. So I setup a Centos 5.2
(fresh install) and followed the instruction on the wiki installed the
new Freeswitch v1.0.3. After the installation I can start FS by issus
command "/usr/local/freeswitch/bin/freeswitch".



After that I copied freeswitch.init.centos5 to /etc/init.d/freeswitch
and chmod it to 755. Reboot the server and FS is not running.



If I try the start up script:

[root@localhost build]# /etc/init.d/freeswitch start
Starting freeswitch: [ OK ]

[root@localhost build]# /etc/init.d/freeswitch status
freeswitch dead but subsys locked

Did I miss somthing here? Please help. Thanks a lot.



dynaguy











Here is the copy of the origenal freeswitch.init.centos5

----------------------------


[root@localhost ~]# cat /etc/init.d/freeswitch
#!/bin/bash
#
# /etc/rc.d/init.d/freeswitch
#
# The FreeSwitch Open Source Voice Platform
#
# chkconfig: 345 89 14
# description: Starts and stops the freeswitch server daemon
# processname: freeswitch
# config: /usr/local/freeswitch/conf/freeswitch.conf
# pidfile: /usr/local/freeswitch/log/freeswitch.pid
#

# Source function library.
. /etc/init.d/functions

PROG_NAME=freeswitch
PID_FILE=${PID_FILE-/usr/local/freeswitch/log/freeswitch.pid}
FS_USER=${FS_USER-freeswitch}
FS_FILE=${FS_FILE-/usr/local/freeswitch/bin/freeswitch}
FS_HOME=${FS_HOME-/usr/local/freeswitch}
LOCK_FILE=/var/lock/subsys/freeswitch
FREESWITCH_ARGS="-nc"
RETVAL=0

# Source options file
if [ -f /etc/sysconfig/freeswitch ]; then
. /etc/sysconfig/freeswitch
fi

# <define any local shell functions used by the code that follows>

start() {
echo -n "Starting $PROG_NAME: "
if [ -e $LOCK_FILE ]; then
if [ -e $PID_FILE ] && [ -e /proc/`cat $PID_FILE` ]; then
echo
echo -n $"$PROG_NAME is already running.";
failure $"$PROG_NAME is already running.";
echo
return 1
fi
fi
cd $FS_HOME
daemon --user $FS_USER --pidfile $PID_FILE "$FS_FILE
$FREESWITCH_ARGS $FREESWITCH_PARAMS >/dev/null 2>&1"
echo
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCK_FILE;
echo
return $RETVAL
}

stop() {
echo -n "Shutting down $PROG_NAME: "
if [ ! -e $LOCK_FILE ]; then
echo
echo -n $"cannot stop $PROG_NAME: $PROG_NAME is not
running."
failure $"cannot stop $PROG_NAME: $PROG_NAME is not
running."
echo
return 1;
fi
cd $FS_HOME
$FS_FILE -stop > /dev/null 2>&1
killproc $PROG_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE;
return $RETVAL
}

rhstatus() {
status $PROG_NAME;
}

case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $PROG_NAME
RETVAL=$?
;;
restart)
stop
start
;;
reload)
# <cause the service configuration to be reread, either with
# kill -HUP or by restarting the daemons, in a manner similar
# to restart above>
;;
condrestart)
[ -f $PID_FILE ] && restart || :
;;
*)
echo "Usage: $PROG_NAME {start|stop|status|reload|restart}"
exit 1
;;
esac
exit $RETVAL




_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Thu Mar 05, 2009 6:45 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

You might not wanna start it in level 2... network might not be up yet.

/b

On Mar 5, 2009, at 5:32 PM, Raul Fragoso wrote:

Quote:
Hi, and welcome to FreeSWITCH !

You've done everything right, now you only need to tell your system to
run that init script during startup Wink
As root, do this:
chkconfig --add freeswitch
chkconfig --level 2345 freeswitch on

That's all.

Regards,

Raul


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
dynaguy at gmail.com
Guest





PostPosted: Thu Mar 05, 2009 8:12 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

Thanks for all your advices.

I am still struggle to make FS start.

I tried few things included:
chkconfig --add freeswitch
chkconfig --level 345 freeswitch on

I also added a user "freeswitch"

The problem is : if I run "/etc/init.d./freeswitch" manually, it says [OK] like this:
[root@localhost build]# /etc/init.d/freeswitch start
Starting freeswitch:             [  OK  ]

But then I did a "ps aux | grep freeswitch" it doesn't show FS running.

I am not a script guru. If I run FS from commandline as root:
 /usr/local/freeswitch/bin/freeswitch
then I can see FS running.

What did I missing here?

dynaguy
 



 

On Thu, Mar 5, 2009 at 3:39 PM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote:
You might not wanna start it in level 2... network might not be up yet.

/b

On Mar 5, 2009, at 5:32 PM, Raul Fragoso wrote:

Quote:
Hi, and welcome to FreeSWITCH !

You've done everything right, now you only need to tell your system to
run that init script during startup Wink
As root, do this:
chkconfig --add freeswitch
chkconfig --level 2345 freeswitch on

That's all.

Regards,

Raul




_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Back to top
raul at etellicom.com
Guest





PostPosted: Thu Mar 05, 2009 8:17 pm    Post subject: [Freeswitch-users] Newbie's installation: Can't start FS at Reply with quote

Ah yes, my mistake, thanks for the correction Brian.

On Thu, 2009-03-05 at 17:39 -0600, Brian West wrote:
Quote:
You might not wanna start it in level 2... network might not be up yet.

/b

On Mar 5, 2009, at 5:32 PM, Raul Fragoso wrote:

Quote:
Hi, and welcome to FreeSWITCH !

You've done everything right, now you only need to tell your system to
run that init script during startup Wink
As root, do this:
chkconfig --add freeswitch
chkconfig --level 2345 freeswitch on

That's all.

Regards,

Raul


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services