[asterisk-users] Asterisk CLI and database problem
mjordan at digium.com
Tue Dec 22 16:37:51 CST 2015
On Tue, Dec 22, 2015 at 3:48 AM, <pierre.guyard at orange.com> wrote:
> I have a problem related to the Asterisk CLI, when I enter "asterisk -rv",
> 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
> 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
> 1474 ? 00:00:14 asterisk
> 1615 pts/3 00:00:13 asterisk
> 31411 ? 00:00:00 safe_asterisk
> 31414 ? 01:08:53 asterisk
> I don't know if it's the case and which one of these I should kill?
> Furthermore, I can access to the CLI with “asterisk –cv” but I often got
> the following warning : “db.c:288 db_execute_sql: Error executing SQL
> (COMMIT): database is locked”.
> Otherwise, is there another way to fix my problem?
> Thank you in advance!
I would suspect that you have installed Asterisk in such a fashion that a
particular user or user with certain permissions is required to access the
/var/run directory, as well as other directories Asterisk uses (such as
where it stores the AstDB).
You are then probably running the safe_asterisk script under a user without
sufficient permissions, and/or running/invoking the Asterisk CLI (via
"asterisk -rv") as a user with insufficient permissions.
I would double check:
(1) What user/groups own the various Asterisk directories (specified in
(2) What user/group you are running the safe_asterisk script under
(3) What user/group you are running as when you attempt to connect to
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users