I’m new in asterisk and after i install it in Ubuntu Server ver 16.06. and when i type the <sudo Asterisk -r> its returen (Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)) so i change the permission of the file to 777 by (chmod 777 asterisk.ctl).
after i change the Permission and after i enter <sudo Asterisk -r> i get the below result
root@ubuntu:/var/run/asterisk# asterisk -r
Asterisk 13.1.0~dfsg-1.1ubuntu4, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
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 13.1.0~dfsg-1.1ubuntu4 currently running on ubuntu (pid = 13578)
[Dec 12 06:03:17] NOTICE[13578]: res_config_ldap.c:1710 parse_config: No directory user found, anonymous binding as default.
[Dec 12 06:03:17] ERROR[13578]: res_config_ldap.c:1736 parse_config: No directory URL or host found.
[Dec 12 06:03:17] ERROR[13578]: res_config_ldap.c:1613 load_module: Cannot load LDAP RealTime driver.
ubuntu*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
Changing files to 777 is never a good idea, and in some cases is detected as a security risk and causes the file to be ignored by the application (not Asterisk).
How did you install Asterisk? What user were you when you tried to run asterisk -r?
Basically you need to run asterisk -r under the same user that created the .ctl file, or run it as root.
Unfortunately, if this is a package, it may have been built with options that make it impossible to debug.
However, from your other error, it does like you have incompatible modules in your modules directory, or have wrong versions of run time pre-requisites (the packager may not have included all the necessary version constraints).