[asterisk-users] problem with safe_asterisk
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Wed Feb 14 14:20:43 MST 2007
On Wed, Feb 14, 2007 at 08:39:36AM +0000, Gordon Henderson wrote:
> On Tue, 13 Feb 2007, Tzafrir Cohen wrote:
>
> >On Tue, Feb 13, 2007 at 01:35:50PM +0100, Andrea De Vita wrote:
> >>Hi all,
> >>
> >>I have installed some Asterisk machine, all with the same problem.
> >>My typical configuration is:
> >>- Asterisk 1.2.14 (or 1.4.0beta3)
> >>- CentOS 4.4 server.
> >>
> >>
> >>The problem is this:
> >>When I start Asterisk with the default init script (/etc/init.d/asterisk
> >>start) distributed with the source, and kill (or kill -9) Asterisk-pid,
> >>then safe_asterisk doesn't correctly work (it dies and not restart
> >>Asterisk).
> >>Instead, if I start Asterisk with safe_asterisk command from shell,
> >>after "kill Asterisk-pid", safe_asterisk restart Asterisk correctly.
> >>
> >>I would use the init script because I like to use Linux-HA that require
> >>this.
> >
> >Edit that init.d script lightly not to use safe_asterisk.
> >safe_asterisk is not close to robust anyway, and thus will only
> >complicate things.
>
> Seconded. Have a look at this:
>
> http://www.drogon.net/init.d.asterisk
Here is one bad case many people seem to miss:
Run 'asterisk -c'
Now press ctrl-z (SIGSTOP) to freeze it.
Now try running your script's "stop" target. It will hang forever on the
write to the asterisk.ctl socket.
A hung stop target can freeze a shutdown of a server.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir at jabber.org
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-users
mailing list