Asterisk Start Via Systemd Fails, But Its Running

Home » Asterisk Users » Asterisk Start Via Systemd Fails, But Its Running
Asterisk Users 1 Comment

I have a fresh Asterisk 18 install on a fresh OS (AWS Linux 2). I used the service file from contrib directory and commented out user and group settings so it runs under root.

When I start Asterisk via systemd it waits a long time and then times out. Reporting failure to the command line. Result of journalctl -xe is below.

However, the asterisk executable has started and is running, I can connect to it via ‘asterisk -r’. Is there a change needed to the service file?
(Anyone tested under Amazon Linux 2)

Mar 08 02:33:04 ip-172-31-25-10.us-east-2.compute.internal dhclient[2858]:
XMT: Solicit on eth0, interval 119780ms.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
asterisk.service start operation timed out. Terminating.

Mar 08 02:33:55 ip-172-31-25-10.us-east-2.compute.internal systemd[1]:
Failed to start Asterisk PBX and telephony daemon..

— Subject: Unit asterisk.service has failed

— Defined-By: systemd

— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

One thought on - Asterisk Start Via Systemd Fails, But Its Running

  • Le 08/03/2022 à 03:40, TTT a écrit :

    Hello,

    The service file provided in the “contrib” directory defines a service of type “notify”. To get it work, Asterisk needs to be compiled with the option “HAVE_SYSTEMD”.

    Otherwise, you can modify the service file to define the service as
    “forking” instead of “notify”.

    Regards

    Jean