Bug#786963: asterisk: running /etc/init.d/asterisk start after a crash, or after issuing a stop via asterisk console doesn't start asterisk

Bernhard Schmidt berni at debian.org
Sun Oct 9 18:49:17 UTC 2016


Control: fixed -1 1:13.0.0~dfsg-1

On Wed, May 27, 2015 at 10:35:33AM +0200, Simone Ricci wrote:

Hi,

> trying to start asterisk via /etc/init.d/asterisk start, or by issuing
> a systemctl start asterisk fails (nothing happens) if machine is
> recovering from a crash, asterisk itself has crashed or stopped via
> its console. That's probably related to systemd seeing it running even
> if it's not.
> 
> How to reproduce:
> * Start asterisk normally
> * Stop it via its console (eg. asterisk -rx 'core stop now')
> * Try to start it again, either via /etc/init.d/asterisk start or systemctl start asterisk
> * Nothing Happens and systemctl reports the software as active, for example:
> 
> 	root at softswitch-02:~# systemctl status asterisk
> 	● asterisk.service - LSB: Asterisk PBX
                             ^^^

This is an issue specific to Jessie, which uses systemd but does not
ship a native systemd unit for Asterisk. The problem is that "systemctl
status" checks the status of the unit, but does not invoke the status
action of the init script for further checks. The unit is always active,
whether the process has exited or not.

The fix is to ship a native unit with the appropriate type, as done in
sid. I don't think this can be fixed in jessie, since adding systemd
units has never been accepted for stable updates in the past. You can
fix it locally by adding a systemd unit (i.e. use
https://sources.debian.net/src/asterisk/1:13.10.0~dfsg-1/contrib/asterisk.service/)
in either /lib/systemd/system or /etc/systemd/system.

Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-voip-maintainers/attachments/20161009/0ccc9ccb/attachment.sig>


More information about the Pkg-voip-maintainers mailing list