[asterisk-users] Centos 6.5 Asterisk 1.8.11.0 - starts in rc.local, but not contactible?

Stefan Viljoen viljoens at verishare.co.za
Thu Jul 23 04:13:05 CDT 2015


Hi list

I'm trying to get Asterisk 1.8.11.0 to start automatically when my Centos
6.5 box boots.

I've done this many times before, but for some reason, on this box and
hardware (older Core i3 system, 4GB RAM) I cannot get Asterisk to be
contactible after boot.

E. g. in rc.local I have, as the last line

---
asterisk
---

as in all my other Asterisk boxes with Centos 6.5 and Asterisk 1. 8.11.0

This -does- start asterisk on boot, but you cannot connect to it using

asterisk -r

the error being

---
[root at asterisk ~]# asterisk -r
Asterisk 1.8.11.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
=========================================================================
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
[root at asterisk ~]#
---

And I note that /var/run/asterisk.ctl does NOT exist, which is why asterisk
-r does not work...

I do note that there are error messages in /var/log/asterisk/messages, to
whit:

---
[Jul 23 10:59:31] WARNING[1863] loader.c: Error loading module
'codec_g729.so': /usr/lib/asterisk/modules/codec_g729.so: cannot enable
executable stack as shared object requires: Permission denied
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Unable to connect: Adaptive Server
is unavailable or does not exist (20009)
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Permission denied (13)
[Jul 23 11:02:22] ERROR[1900] cdr_tds.c: Unable to connect to sqlserver
---

However, if I kill -9 the "uncontactible" asterisk process and start it
manually as root, everything works and runs fine, and I can connect to the
running asterisk instance via asteriskr -r in a terminal.
The above error messages are not emitted if asterisk is started by hand like
this.

Why does Asterisk have persmission problems when started out of
/etc/rc.local (as root) vs. when I start it by hand while logged in as root?

No config changes made to Centos 6.5 except for installing it from DVD and
running a yum update.

Thanks

Stefan




More information about the asterisk-users mailing list