Unable to connect to remote asterisk

I reinstalled asterisk now when I give the command # asterisk-vvvvr
I get this error:
Privilege escalation protection disabled!
See wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Unable to connect to remote asterisk (does / var / run / asterisk / asterisk.ctl exist?)
I gave these commands:
ls-l / var / run / asterisk / asterisk.ctl
chown-R username / var / run / asterisk
and then reboot
and do not function!

There are no spaces around the /'s.

Do ps to see if it is actually running. If not, look at the logs to see where it failed. If it didn’t produce logs, run in the foreground using asterisk -cvvvvvv.

There is also a space before the -R.

If you did have that space and also the spaces around the /s, you will have broken the file ownerhips on the system so badly that you should probably re-install the OS. If you are going to do recursive chown’s, you should cd down to the directory and do chown on ., to reduce the chances of error. In this case, I would have cd’ed and then chown’ed the specific file, or, at most *, not recursively.

commands I have written without spaces, but the problem is still present.
can you explain me step by step commands to give?

The Asterisk Shell Command

Asterisk can be run either as a daemon or as an application. In general, you will want to run it as an application when you are building, testing, and troubleshooting, and as a daemon when you put it into production.

The command to start Asterisk is the same regardless of whether you’re running it as a daemon or an application:


However, without any arguments, this command will assume certain defaults and start Asterisk as a background application. In other words, you never want to run the command asterisk on its own, but rather will want to pass some options to it to better define the behavior you are looking for. The following list provides some examples of common usages.

This command displays a helpful list of the options you can use. For a complete list of all the options and their descriptions, run the command man asterisk.

This option starts Asterisk as an application (in the foreground). This means that Asterisk is tied to your user session. In other words, if you close your user session by logging out or losing the connection, Asterisk dies. This is the option you will typically use when building, testing, and debugging, but you would not want to use this option in production. If you started Asterisk in this manner, type core stop now at the CLI prompt to stop Asterisk and exit.

-v, -vv, -vvv, -vvvv, etc.
This option can be used with other options (e.g., -cvvv) in order to increase the verbosity of the console output. It does exactly the same thing as the CLI command core set verbose n where n is any integer between 0 and 5 (any integer greater than 5 will work, but will not provide any more verbosity). Sometimes it’s useful to not set the verbosity at all. For example, if you are looking to see only startup errors, notices, and warnings, leaving verbosity off will prevent all the other startup messages from being displayed.

-d, -dd, -ddd, -dddd, etc.
This option can be used in the same way as -v, but instead of normal output, this will specify the level of debug output (which is primarily useful for developers who wish to troubleshoot problems with the code). You will also need to enable output of debugging information in the logger.conf file (which we will cover in more detail in Chapter 24, System Monitoring and Logging).

This command is essential if you want to connect to the CLI of an Asterisk process running as a daemon. You will probably use this option more than any other for Asterisk systems that are in production. This option will only work if you have a daemonized instance of Asterisk already running. To exit the CLI when this option has been used, type exit.

This option will add a timestamp to CLI output.

This command allows you to pass a string to Asterisk that will be executed as if it had been typed at the CLI. As an example, to get a quick listing of all the channels in use without having to start the Asterisk console, simply type asterisk -rx ‘core show channels’ from the shell, and you’ll get the output you are looking for.

This option instructs Asterisk to dump a core file if it crashes.

asteriskdocs.org/en/3rd_Edit … -book.html


Look if it could be usefull

Although it wouldn’t affect successful startup, or the ability to run a remote console.

Yes…now i remember…my problems was capi channel recompiling…
Tipically after upgrade asterisk third party modules should be loaded one at the time…with noload in modules.conf…