[asterisk-users] Re: Can't find asterisk.ctl under CentOS installation

Axel Thimm Axel.Thimm at ATrpms.net
Tue Jan 23 06:48:07 MST 2007


On Tue, Jan 23, 2007 at 09:27:03PM +1100, Devraj Mukherjee wrote:
> I recently upgraded to Asterisk 1.4 using the RPMS at ATrpms.net on
> CentOS 4.4, Asterisk starts up but when I start the console it reports
> this error and drops out.
> 
> "Unable to connect to remote asterisk (does
> /var/run/asterisk/asterisk.ctl exist)?"
> 
> I have checked to see that the file asterisk.ctl actually exists. Any
> suggestions?

Have you tried asterisk -r as root or as a non-root user? See below
for details.

On Tue, Jan 23, 2007 at 08:10:29AM -0500, Steven wrote:
> If you are not running asterisk as root, then change the permissions
> on the /var/run/asterisk folder and below to allow you user access.

asterisk on ATrpms runs as asterisk:asterisk and the folder belongs to
that uid/gid:

# ls -ld /var/run/asterisk
drwxr-xr-x 2 asterisk asterisk 4096 Jan 16 17:30 /var/run/asterisk

> Also, I seem to remember that on one release, the entry in
> asterisk.conf did not match safe_asterisk. So the ctl file was NOT
> where asterisk was looking.

asterisk.conf does point to the same folder.

# grep astrundir /etc/asterisk/asterisk.conf 
astrundir => /var/run/asterisk

And safe_asterisk/asterisk do use that file according to lsof
asterisk    3u  unix 0xffff8800332dfc00          213094 /var/run/asterisk/asterisk.ctl

If I call asterisk -r as root it succeeds, if as another user it will
give Devraj's error message. That's probably how it is supposed to
work, or not?
-- 
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20070123/eeb8dc33/attachment.pgp


More information about the asterisk-users mailing list