I have a problem related to the Asterisk CLI, when I enter “asterisk -rvvvvvvvvvvvvvv”, it cannot display the Asterisk CLI and instaed, I have this message “Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?).”
When I check with “locate asterisk.ctl”, it is indeed in the repertory “/var/run/”.
So after searching I have found we can enter “ps -A | grep asterisk” in order to find an asterisk “ghost” running and then kill it, and I have found:
Probably the most common cause if this is a permissions problem, rather than a ghost Asterisk, but the Asterisk with the large CPU time is clearly the real Asterisk.
Also, before trying to kill it, try “service asterisk stop”.