Asteisk 16.18.0 restart was unsuccessful, only functioning again after rebooting the operating system

Hello everyone,

I’m facing an unusual issue (occurred after running Asterisk continuously for about 3 months).

Description:

  • Asterisk is not running normally: the status of systemctl status asterisk shows running(exited).
  • Restarting and running the command asterisk -rcvvvvvvvv, the displayed status is: Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?).
    Unfortunately, I had turned off Asterisk logging mode, so I don’t know the exact issue.
    After checking the system log (syslog), it seems that the service is being restarted multiple times continuously but unsuccessfully.
May  1 08:09:58 linux systemd[1]: asterisk.service: Deactivated successfully.
May  1 08:09:58 linux systemd[1]: asterisk.service: Unit process 3634905 (asterisk) remains running after unit stopped.
May  1 08:09:58 linux systemd[1]: Stopped LSB: Asterisk PBX.
May  1 08:09:58 linux systemd[1]: asterisk.service: Consumed 4d 6h 14min 59.938s CPU time.
May  1 08:09:59 linux systemd[1]: Starting LSB: Asterisk PBX...
May  1 08:09:59 linux asterisk[43926]:  * Starting Asterisk PBX: asterisk
May  1 08:09:59 linux asterisk[43938]: /usr/sbin/asterisk already running.
May  1 08:09:59 linux asterisk[43926]:    ...done.
May  1 08:09:59 linux systemd[1]: Started LSB: Asterisk PBX.
May  1 08:10:03 linux systemd[1]: Stopping LSB: Asterisk PBX...
May  1 08:10:03 linux asterisk[43982]:  * Stopping Asterisk PBX: asterisk
May  1 08:10:03 linux asterisk[43982]:    ...done.
May  1 08:10:03 linux systemd[1]: asterisk.service: Deactivated successfully.
May  1 08:10:03 linux systemd[1]: Stopped LSB: Asterisk PBX.
May  1 08:10:04 linux systemd[1]: Starting LSB: Asterisk PBX...
May  1 08:10:04 linux asterisk[44019]:  * Starting Asterisk PBX: asterisk
May  1 08:10:04 linux asterisk[44031]: /usr/sbin/asterisk already running.
May  1 08:10:04 linux asterisk[44019]:    ...done.
May  1 08:10:04 linux systemd[1]: Started LSB: Asterisk PBX.

I decided to reboot the operating system (entered the command reboot). After restarting the operating system, Asterisk started working normally again.

I hope someone can pinpoint or suggest the root cause of the issue as described above. Thank you sincerely!
(Asterisk version is 16.18.0, operating system is Ubuntu 22.04)
Thanks!

Asterisk 16 is no longer supported.

The information you have provided simply indicates that Asterisk failed to start. The logs are essential. The only other approach is to identify what has changed.

Note that most of the supplied startup scripts send console output to /dev/tty9, so you could try console switching to that.

Also, as far as I know -c and -r are mutually incompatible. Running without the -r may also give you access to the console messages.

How do you have set SELINUX parameter on /etc/selinux/config ?
Should be SELINUX=permissive mode.

Thank you for your assistance. I’m using the Ubuntu operating system and have checked that SELinux is not present at the specified path. If I recall correctly, CentOS does have it, but it’s not found in Ubuntu 22.04. Asterisk has been running continuously and performing well, handling calls for a long period (24/24 and running continuously for over 3 months). However, an issue occurred, and it was only resolved by rebooting (unable to restart, stop, start).

Even, you can use Asterisk core command, for stop and restart.

At the time of the error, I couldn’t log into the core Asterisk and could only use the command /etc/init.d/asterisk restart or systemctl restart asterisk. However, Asterisk still couldn’t be restarted. When I used the command to check the status, the result showed running(exited) as I described above. Finally, I had no choice but to reboot the entire operating system, after which everything worked fine. My concern is that this error might occur again in the future. I need information on some possible causes that you have encountered before so that I can check if my case matches any of them.
Thanks a lot!

“At the time of the error, I couldn’t log into the core Asterisk and could only use the command /etc/init.d/asterisk restart or systemctl restart asterisk”.

How about logs??? any clues??

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.