Unable to connect to remote asterisk

Receiving the following error message:
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

Im having this issue when attempting to run a (asterisk -r) or trying the Asterisk CLI from the portal.

/var/run/asterisk.ctl does exist and asterisk is running.

Wondering if I have a permissions issue somewhere though I see the user asterisk is running the actual app.

Cannot find errors in any logs.

Any recommendations?

The problem was:

asterisk.ctl and asterisk.pid were still trying to place the files in /var/run and since the user “asterisk” did not have ownership over /var/run it would not place the files there.

chowning /var/run to asterisk was a temporary resolution.


I had the same problem. I searched the internet for hours and tried everything without success. UNTIL I came across a German site, and found this fix that worked for me.

Edit your asterisk.conf file…

nano /etc/asterisk/asterisk.conf

then add these lines to it…

astctlpermissions = 0660
astctlowner = asterisk
astctlgroup = pbx
astctl = asterisk.ctl

Hope it works for you as well as it did for me.

I had this problem on 2 servers-

1-on a new 2.6.0, 2 weeks after it was fully opertional. it was solved by

deleting asterisk.ctl and asterisk.pid under /var/run/asterisk and rebooting

the server.

2-on an old 2.0.0 that worked hard for 140 without a reboot. The asterisk

service showed 100% cpu usage. restard the service and run the command


things came back to life but i couldn’t run aterisk -rvvv, kept getting the

error above.

Did the fix Mikevack wrote and all is good for now.


Without stating how your system is build this can easily be taken out of context and break a system.

By default (and the asterisk documentation) the astctlgroup should be asterisk. It is set that way when asterisk is built unless you override it during compile time and KNOW what you are doing. This value is the second part of the owner:group settings that is used for all files created by asterisk. So changing this to something that your system is not configured for, will break many more systems then fix them.


As of the date of your post there is NOT 2.6.0 version of FreePBX.

To fskrotzki-my wrong, 2.4.0 .

Got it mixed with my trixbox version.Thanks