safe_freeswitch (like safe_asterisk): restarting FS automatically?
Hi all, We've got an older version of FreeSWITCH (Trunk 7948) running on a Linux x86_64 machine. At the moment it's crashing few times a day, making our services very unreliable. At the moment we don't have the time to rebuild this version, so I'm looking for an equivalent of the "safe_asterisk" script. This script runs Asterisk in a loop, restarting it when it goes down. I couldn't find any equivalent script, but maybe I using the wrong keywords in my search. Does anyone know if such a script is available, and (if so) could you point out where I can find it? Thanks, Birgit -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- <URL: http://www.westhawk.co.uk>
http://jira.freeswitch.org/browse/MODAPP-89 I'll recommend that you update. I'll bet its a memory related crash or an assert in sofia. /b On Jul 23, 2008, at 4:56 AM, Birgit Arkesteijn wrote:
Hi all,
We've got an older version of FreeSWITCH (Trunk 7948) running on a Linux x86_64 machine. At the moment it's crashing few times a day, making our services very unreliable.
At the moment we don't have the time to rebuild this version, so I'm looking for an equivalent of the "safe_asterisk" script. This script runs Asterisk in a loop, restarting it when it goes down.
I couldn't find any equivalent script, but maybe I using the wrong keywords in my search.
Does anyone know if such a script is available, and (if so) could you point out where I can find it?
Thanks, Birgit
-- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- <URL: http://www.westhawk.co.uk>
_______________________________________________ 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
Brian West sip:brian@freeswitch.org
you do realize we are on 9139 now right? you would be missing out not to update. On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org> wrote:
http://jira.freeswitch.org/browse/MODAPP-89
I'll recommend that you update. I'll bet its a memory related crash or an assert in sofia.
/b
On Jul 23, 2008, at 4:56 AM, Birgit Arkesteijn wrote:
Hi all,
We've got an older version of FreeSWITCH (Trunk 7948) running on a Linux x86_64 machine. At the moment it's crashing few times a day, making our services very unreliable.
At the moment we don't have the time to rebuild this version, so I'm looking for an equivalent of the "safe_asterisk" script. This script runs Asterisk in a loop, restarting it when it goes down.
I couldn't find any equivalent script, but maybe I using the wrong keywords in my search.
Does anyone know if such a script is available, and (if so) could you point out where I can find it?
Thanks, Birgit
-- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- <URL: http://www.westhawk.co.uk>
_______________________________________________ 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
Brian West sip:brian@freeswitch.org <sip%3Abrian@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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Hi Anthony and Brian, Thanks for your replies! I know we should upgrade and we will at some point, but honestly (cross my heart and hope to die), I just don't have the time at the moment. Thanks, Birgit On 23/07/08 14:17, Anthony Minessale wrote:
you do realize we are on 9139 now right? you would be missing out not to update.
On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org>> wrote:
http://jira.freeswitch.org/browse/MODAPP-89
I'll recommend that you update. I'll bet its a memory related crash or an assert in sofia.
/b
if you would have typed "make current" when you sent the original you would be done by now. On Wed, Jul 23, 2008 at 8:52 AM, Birgit Arkesteijn <birgit@westhawk.co.uk> wrote:
Hi Anthony and Brian,
Thanks for your replies!
I know we should upgrade and we will at some point, but honestly (cross my heart and hope to die), I just don't have the time at the moment.
Thanks, Birgit
On 23/07/08 14:17, Anthony Minessale wrote:
you do realize we are on 9139 now right? you would be missing out not to update.
On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org>> wrote:
http://jira.freeswitch.org/browse/MODAPP-89
I'll recommend that you update. I'll bet its a memory related crash or an assert in sofia.
/b
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
With respect, this may well not be true. I've had a handful of "upgrade breaks things" issues where, for example, variables in CDRs change name, or dtmf-digit becomes dtmf- string (or the other way round - can't remember) in an event, etc. --Dave
if you would have typed "make current" when you sent the original you would be done by now.
On Wed, Jul 23, 2008 at 8:52 AM, Birgit Arkesteijn <birgit@westhawk.co.uk <mailto:birgit@westhawk.co.uk>> wrote:
Hi Anthony and Brian,
Thanks for your replies!
I know we should upgrade and we will at some point, but honestly (cross my heart and hope to die), I just don't have the time at the moment.
Thanks, Birgit
On 23/07/08 14:17, Anthony Minessale wrote: > you do realize we are on 9139 now right? you would be missing out not to > update. > > > On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org> > <mailto:brian@freeswitch.org <mailto:brian@freeswitch.org>>> wrote: > > http://jira.freeswitch.org/browse/MODAPP-89 > > I'll recommend that you update. I'll bet its a memory related crash > or an assert in sofia. > > /b
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 ------------------------------------------------------------------------
_______________________________________________ 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
-- David Knell, Director, 3C Limited T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031 http://www.3c.co.uk
What else would you expect? That is the risk you take using the beta version of open source free software. Since we are probably tagging 1.0.1 today TRUNK and forward is the only version we are going to support with our usual triple-your-money-back guarantee! On Wed, Jul 23, 2008 at 9:37 AM, David Knell <dave@3c.co.uk> wrote:
With respect, this may well not be true. I've had a handful of "upgrade breaks things" issues where, for example, variables in CDRs change name, or dtmf-digit becomes dtmf- string (or the other way round - can't remember) in an event, etc.
--Dave
if you would have typed "make current" when you sent the original you would be done by now.
On Wed, Jul 23, 2008 at 8:52 AM, Birgit Arkesteijn <birgit@westhawk.co.uk> wrote:
Hi Anthony and Brian,
Thanks for your replies!
I know we should upgrade and we will at some point, but honestly (cross my heart and hope to die), I just don't have the time at the moment.
Thanks, Birgit
On 23/07/08 14:17, Anthony Minessale wrote:
you do realize we are on 9139 now right? you would be missing out not to update.
On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org>> wrote:
http://jira.freeswitch.org/browse/MODAPP-89
I'll recommend that you update. I'll bet its a memory related crash or an assert in sofia.
/b
_______________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
------------------------------
_______________________________________________ Freeswitch-users mailing listFreeswitch-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
-- David Knell, Director, 3C Limited T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031http://www.3c.co.uk
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Hi Anthony, To be honest, I didn't expect changes to lightly be made which broke backwards compatibility in something which is notionally in beta, but I didn't (and don't) complain about it - it's just something which might have caused Birgit a bit of grief if she'd followed your advice. Looking forward to 1.0.1! Cheers -- Dave
What else would you expect?
That is the risk you take using the beta version of open source free software.
Since we are probably tagging 1.0.1 today TRUNK and forward is the only version we are going to support with our usual triple-your-money-back guarantee!
On Wed, Jul 23, 2008 at 9:37 AM, David Knell <dave@3c.co.uk <mailto:dave@3c.co.uk>> wrote:
With respect, this may well not be true. I've had a handful of "upgrade breaks things" issues where, for example, variables in CDRs change name, or dtmf-digit becomes dtmf- string (or the other way round - can't remember) in an event, etc.
--Dave
if you would have typed "make current" when you sent the original you would be done by now.
On Wed, Jul 23, 2008 at 8:52 AM, Birgit Arkesteijn <birgit@westhawk.co.uk <mailto:birgit@westhawk.co.uk>> wrote:
Hi Anthony and Brian,
Thanks for your replies!
I know we should upgrade and we will at some point, but honestly (cross my heart and hope to die), I just don't have the time at the moment.
Thanks, Birgit
On 23/07/08 14:17, Anthony Minessale wrote: > you do realize we are on 9139 now right? you would be missing out not to > update. > > > On Wed, Jul 23, 2008 at 8:05 AM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org> > <mailto:brian@freeswitch.org <mailto:brian@freeswitch.org>>> wrote: > > http://jira.freeswitch.org/browse/MODAPP-89 > > I'll recommend that you update. I'll bet its a memory related crash > or an assert in sofia. > > /b
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 ------------------------------------------------------------------------ _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
-- David Knell, Director, 3C Limited T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031 http://www.3c.co.uk
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org <mailto: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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400 ------------------------------------------------------------------------
_______________________________________________ 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
-- David Knell, Director, 3C Limited T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031 http://www.3c.co.uk
Birgit Arkesteijn wrote:
Hi all,
We've got an older version of FreeSWITCH (Trunk 7948) running on a Linux x86_64 machine. At the moment it's crashing few times a day, making our services very unreliable.
At the moment we don't have the time to rebuild this version, so I'm looking for an equivalent of the "safe_asterisk" script. This script runs Asterisk in a loop, restarting it when it goes down.
I couldn't find any equivalent script, but maybe I using the wrong keywords in my search.
Does anyone know if such a script is available, and (if so) could you point out where I can find it?
Thanks, Birgit
not too go against the freeswitch crew, especially since I agree you should probably update. (just backup fs first). I am not sure of the performance implications running fs like this (-nf) but you can do something like (and this it's quite a nasty hack): #!/bin/sh PREFIX=/usr/local/freeswitch stop() { local count=0 kill -9 `cat /var/run/freeswitch_loop.pid` > /dev/null 2>&1 while [ $count -lt 10 ]; do [ $count -gt 0 ] && sleep 5 count=`expr $count + 1` pidof freeswitch > /dev/null && killall freeswitch || count=100 done return $? } start() { while true; do $PREFIX/bin/freeswitch -nc -nf > /dev/null 2>&1; done & echo $! > /var/run/freeswitch_loop.pid return 0 } case "$1" in start) start ;; stop) stop ;; restart) killall -HUP freeswitch;; reload) killall -HUP freeswitch;; esac exit $?
There should be no performance issues with -nf. This is the exact reason it exists. Mike On Jul 23, 2008, at 9:43 PM, "John Skopis (Lists)" <jlists@skopis.com> wrote:
Birgit Arkesteijn wrote:
Hi all,
We've got an older version of FreeSWITCH (Trunk 7948) running on a Linux x86_64 machine. At the moment it's crashing few times a day, making our services very unreliable.
At the moment we don't have the time to rebuild this version, so I'm looking for an equivalent of the "safe_asterisk" script. This script runs Asterisk in a loop, restarting it when it goes down.
I couldn't find any equivalent script, but maybe I using the wrong keywords in my search.
Does anyone know if such a script is available, and (if so) could you point out where I can find it?
Thanks, Birgit
not too go against the freeswitch crew, especially since I agree you should probably update. (just backup fs first).
I am not sure of the performance implications running fs like this (- nf) but you can do something like (and this it's quite a nasty hack):
#!/bin/sh
PREFIX=/usr/local/freeswitch
stop() { local count=0 kill -9 `cat /var/run/freeswitch_loop.pid` > /dev/null 2>&1
while [ $count -lt 10 ]; do [ $count -gt 0 ] && sleep 5 count=`expr $count + 1` pidof freeswitch > /dev/null && killall freeswitch || count=100 done
return $? }
start() { while true; do $PREFIX/bin/freeswitch -nc -nf > /dev/null 2>&1; done & echo $! > /var/run/freeswitch_loop.pid return 0 }
case "$1" in start) start ;; stop) stop ;; restart) killall -HUP freeswitch;; reload) killall -HUP freeswitch;;
esac
exit $?
_______________________________________________ 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
participants (6)
-
Anthony Minessale
-
Birgit Arkesteijn
-
Brian West
-
David Knell
-
John Skopis (Lists)
-
Michael Jerris