Compiling Asterisk Makes Systemd Timeout When Starting The Service

Home » Asterisk Users » Compiling Asterisk Makes Systemd Timeout When Starting The Service
Asterisk Users No Comments

I am banging my head.

Stock asterisk on Ubuntu 22.04 (Jammy) installs and works fine, but I want to update the source code.

I use this configure line

./configure LDFLAGS=”-z muldefs” –libdir=/usr/lib/x86_64-linux-gnu
–with-unixodbc=$(odbc_config –include-prefix)/ –with-pjproject-bundled
–disable-dev-mode –with-user=asterisk

And it works, but the when I do

systemctl start asterisk

it hangs , on my command line because systemd times out waiting for a confirmation that the service started, and start it id did. But a few seconds later systemd kills asterisk and again tries to start the service.

systemctl status asterisk

* asterisk.service – Asterisk PBX

Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enabled)

Drop-In: /run/systemd/system/service.d

`-zzz-lxc-service.conf

Active: activating (start) since Sat 2023-04-29 03:46:30 UTC; 1min 25s ago

Docs: man:asterisk(8)

Main PID: 93000 (asterisk)

Tasks: 67

CPU: 1.597s

CGroup: /system.slice/asterisk.service

|-93000 /usr/sbin/asterisk -g -f -p -U asterisk

`-93001 astcanary
/var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 93000

Apr 29 03:46:30 asterisk systemd[1]: Starting Asterisk PBX…

The machine log

Apr 29 03:48:06 asterisk systemd[1]: asterisk.service: Main process exited, code=exited, status 3/EXEC

Apr 29 03:48:06 asterisk systemd[1]: asterisk.service: Failed with result
‘exit-code’.

Apr 29 03:48:06 asterisk systemd[1]: Failed to start Asterisk PBX.

Apr 29 03:48:07 asterisk systemd[1]: asterisk.service: Scheduled restart job, restart counter is at 12.

Apr 29 03:48:07 asterisk systemd[1]: Stopped Asterisk PBX.

Apr 29 03:48:07 asterisk systemd[1]: asterisk.service: Start request repeated too quickly.

Apr 29 03:48:07 asterisk systemd[1]: asterisk.service: Failed with result
‘exit-code’.

Apr 29 03:48:07 asterisk systemd[1]: Failed to start Asterisk P