[asterisk-users] two safe_asterisk processes on the same PBX???

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Sep 15 02:45:21 MST 2006


On Fri, Sep 15, 2006 at 11:02:37AM +0200, Giorgio Incantalupo wrote:
> Hi Tzafrir,
> safe_asterisk use was encouraged on wiki pages....it has never given me 
> crash problems or something similar....the problem I have is to have two 
> safe_asterisk processes which causes a lot of  messages inside logs.
> 
> How did you replace safe_asterisk?

Just run asterisk as a daemon. There is simply no need in an extra
wrapper script. I have an init.d script anyway.

I did ad a "debug" option to the debian init.d script to start asterisk
undaemonized (but with all the other options. Most notbly -U and -p) t
ohelp me trace issues where asterisk does not start. This is mainly
because people (me included) tend to forget to add -U and then a simple
run of 'asterisk -vvvvvvvvvvvvvvvvvv' ends up with root-owned files that
prevent a proper asterisk from starting the next time.

As I wrote: the scrpt safe_aterisk has originated, from my undertnading,
as a workaround to a problem of Asterisk crashing. IMHO you should use
it as a temporary workaround if you already have experinced crashes and
want to keep PBX up while tracking down the issue. But first and
formost, you should fix the issue.

safe_aterisk comes at the price of complicating the setup. As in your
case. And it is not a silver-bullet, either. put one bogus module in
/usr/lib/modules/asterisk . This will cause asterisk to segfault at
startup. With safe_asterisk you will get a crash-loop.

With an init.d script the script will return "success" (as it has not
failed before daemonizing) but at least you won't have a "service"
running.

-- 
Tzafrir Cohen         sip:tzafrir at local.xorcom.com
icq#16849755          iax:tzafrir at local.xorcom.com
+972-50-7952406          jabber:tzafrir at jabber.org
tzafrir.cohen at xorcom.com     http://www.xorcom.com


More information about the asterisk-users mailing list