Error! Error communicating with Asterisk. Ensure that Asterisk is properly installed and running as the asterisk user Asterisk appears to be running as asterisk Try starting Asterisk with the './start_asterisk start' command in this directory

Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Error!
Error communicating with Asterisk. Ensure that Asterisk is properly installed and running as the asterisk user
Asterisk appears to be running as asterisk
Try starting Asterisk with the ‘./start_asterisk start’ command in this directory

At me CentOS7 + Asterisk 16 + freePBX 14
Did according to the instruction: https://wiki.freepbx.org/display/FOP/Installing+FreePBX+14+on+CentOS+7

ps aux | grep asterisk
asterisk 1680 0.0 0.4 643448 9316 ? S 22:39 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1681 0.0 0.4 643448 9316 ? S 22:39 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1682 0.0 0.4 643448 9316 ? S 22:39 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1683 0.0 0.4 643448 9316 ? S 22:39 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 1687 0.0 0.4 643448 9316 ? S 22:39 0:00 /usr/sbin/httpd -DFOREGROUND
root 2203 0.0 0.0 113188 908 pts/0 S 22:44 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
root 3166 0.0 0.0 112732 968 pts/0 S+ 22:47 0:00 grep --color=auto asterisk

ls -l /home/asterisk
total 0

sestatus
SELinux status: disabled

I’ve seen this error (Asterisk keeps crashing) on new installations where
/etc/asterisk/asterisk.conf
is absent or corrupted. It should look something like

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib64/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
astsbindir => /usr/sbin

[options]
transmit_silence_during_record = yes
languageprefix=yes
execincludes=yes
dontwarn=yes
hideconnect=yes

[files]
astctlpermissions=775

[directories]
astetcdir=/etc/asterisk
astmoddir=/usr/lib64/asterisk/modules
astvarlibdir=/var/lib/asterisk
astagidir=/var/lib/asterisk/agi-bin
astspooldir=/var/spool/asterisk
astrundir=/var/run/asterisk
astlogdir=/var/log/asterisk
[options]
transmit_silence_during_record=yes
languageprefix=yes
execincludes=yes
dontwarn=yes
[files]
astctlpermissions=775

Sorry, I don’t know whether the missing items are responsible for the crashes. I don’t believe that there is much risk in trying the .conf with the other entries. However, if you are concerned, there should be info about the crash, in either /var/log/asterisk/full or /var/log/messages .

./start_asterisk start

STARTING ASTERISK
Asterisk Started

service asterisk status

● asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)

Sep 27 15:16:39 localhost.localdomain systemd[1]: Stopped LSB: Asterisk PBX.
Sep 27 15:19:19 localhost.localdomain systemd[1]: Starting LSB: Asterisk PBX…
Sep 27 15:19:19 localhost.localdomain asterisk[6279]: Starting asterisk:
Sep 27 15:19:19 localhost.localdomain systemd[1]: New main PID 6238 does not exist or is a zombie.
Sep 27 15:19:19 localhost.localdomain systemd[1]: asterisk.service: Supervising process 6308 which is not our child. We’ll most likely not notice when it exits.
Sep 27 15:19:19 localhost.localdomain systemd[1]: Started LSB: Asterisk PBX.
Sep 27 15:20:02 localhost.localdomain systemd[1]: Stopping LSB: Asterisk PBX…
Sep 27 15:20:02 localhost.localdomain asterisk[6666]: Stopping safe_asterisk: [ OK ]
Sep 27 15:20:02 localhost.localdomain asterisk[6666]: Shutting down asterisk: [ OK ]
Sep 27 15:20:02 localhost.localdomain systemd[1]: Stopped LSB: Asterisk PBX.

[Sep 27 16:46:46] ERROR[1954]: logger.c:1816 init_logger: Errors detected in logger.conf. Default console logging is being used.

Asterisk Dynamic Loader Starting:
[Sep 27 16:46:46] WARNING[1954]: loader.c:2222 loader_config_init: ‘modules.conf’ invalid or missing.
[Sep 27 16:46:46] ERROR[1954]: asterisk.c:3927 check_init: Module initialization failed. ASTERISK EXITING!

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