Unable to connect to remote asterisk (does /var/run/asterisk

i have currently installed asterisk 1.8.3 version.
we used centos 6 OS
i have successfully installed asterisk on system like we follow below step
./configure
make
make install
make samples
make config
chkconfig asterisk on

when then i write ‘asterisk -r’ then we are nor able to start asterisk .i got this
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

every time i need to type asterisk -vvvvvgc.
so i m not able to start on asterisk on boot time

can anyone help me?it’s high priority

What is the output of this command (that you execute in the Linux Bash)?:

asterisk -c

when i type this asterisk -c we got this

[root@ip- asterisk]# asterisk -c
[Jun 26 06:20:28] NOTICE[3879]: cdr.c:1567 do_reload: CDR simple logging enabled.
[Jun 26 06:20:28] NOTICE[3879]: loader.c:1118 load_modules: 180 modules will be loaded.
[Jun 26 06:20:28] NOTICE[3879]: res_smdi.c:1414 load_module: No SMDI interfaces are available to listen on, not starting SMDI listener.
…[Jun 26 06:20:28] ERROR[3879]: res_timing_timerfd.c:279 load_module: timerfd_create() not supported by the kernel. Not loading.
…SIP channel loading…
…[Jun 26 06:20:28] NOTICE[3879]: chan_skinny.c:7156 config_load: Configuring skinny from skinny.conf
… == Aliased CLI command ‘hangup request’ to ‘channel request hangup’
== Aliased CLI command ‘originate’ to ‘channel originate’
== Aliased CLI command ‘help’ to ‘core show help’
== Aliased CLI command ‘pri intense debug span’ to ‘pri set debug 2 span’
== Aliased CLI command ‘reload’ to ‘module reload’
…[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:122 pbx_load_module: Starting AEL load process.
[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:135 pbx_load_module: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:138 pbx_load_module: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:145 pbx_load_module: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:150 pbx_load_module: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[Jun 26 06:20:28] NOTICE[3879]: pbx_ael.c:153 pbx_load_module: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
… ]
Asterisk Ready.
*CLI>

It looks like the Asterisk stars quite nicely.

Try running this:

safe_asterisk
asterisk -r

when i type safe_asterisk i have got this
Cannot find specified TTY (9)
please help

Do you disabled Selinux?

Have we established that it is Linux. safe_asterisk relies on the behaviour on Linux, at least on PC hardware, of running multiple virtual terminals on the physical console. You can then switch between them using ctl-alt-Fn. Rather than running asterisk in true background mode, it runs it with output to /dev/tty9, so that you can use ctl-alt-F9 to look at the CLI output. It also doesn’t run it in background mode, so that it can monitor it, and restart it if it crashes.

It seems that something about your system is invalidating that assumption, in which case, you should try running it in true background mode, by running it with no command line options.

i have purchased virtual hosted server for asterisk and i have installed asterisk on it
so how can we type these commands?

If you want good audio, I would advise against anything other than a physical machine for running Asterisk.

You will have to ask your questions of the hosting provider, as we don’t know how they have installed their OSes. We use VMWare, in house, for testing, and it supports the standard PC Linux console interface and will run safeasterisk with no problems.

I would note, though, that if you cannot run asterisk in the background using no parameters at all, your hosted system is not suitable for running any custom services. Also, as far as I know, disabling the use of /dev/tty9 in safeasterisk should be well within the skills of someone trying to install asterisk in the cloud.

I think you might be better buying an asterisk appliance, or, if you must use the cloud, an asterisk based centrex service.