/var/run/asterisk/asterisk.ctl apparently does not exist

Hi All,

I am attempting to install FreePBX (version 2.11.0) on top of Asterisk (1.8.20). The OS is CentOS 6.4 Final. These are all running on a VPS.

My problem is that FreePBX says that Asterisk is not running but I can log into the CLI using asterix -r. This is the output from a few commands:

[[email protected] ~]# service asterisk stop
Stopping asterisk: Asterisk ended with exit status 0
Asterisk shutdown normally.
[ OK ]

[[email protected] ~]# service asterisk start
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Starting asterisk: [ OK ]

[[email protected] ~]# asterisk -cvvv
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use ‘asterisk -r’ to connect.

[[email protected] ~]# asterisk -rvvv
Asterisk, Copyright © 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer [email protected]
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.

Connected to Asterisk currently running on darkstar (pid = 1795)
Verbosity was 0 and is now 3

As you can see, asterisk startup reports that /var/run/asterisk/asterisk.ctl may be missing and then asterisk -cvvv reports it is already running using asterisk.ctl and the CLI is accessible.

I have searched everywhere (well probably missed a few places :slight_smile: but can’t seem to find a solution. I have checked the file exists. I have checked that the admin password is the same in both /etc/asterisk/manager.conf and /etc.amportal.conf.

Any clues as to what else it could be would seriously be appreciated. Thanks for reading about my problem.


Hi guys,

Just to let you know this is now resolved.

localhost was pointing to the IPv6 address and not the IPv4. Simple edit of /etc/hosts, a reboot and everything is working.

Thanks for the awesome application.


Glad it’s working, and thanks for updating on the solution!