Asterisk : Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

hi ,
please i need help who can help me please.i configure asterisk on centos 6 all my configuration are done when i start the dahdi service is give me the unknow service in my search i find this step :cd /usr/src/
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.6.0+2.6.0.tar.gz303
tar zxvf dahdi-linux-complete-2.6.0+2.6.0.tar.gz
cd dahdi-linux-complete-2.6.0+2.6.0
make all
make install
make config
/etc/init.d/dahdi restart
chkconfig dahdi on
then a reboot to make sure all was well and starting correctly.
Into Astersik and issue CLI> dahdi show status
when i finish dahdi is ok.But asterisk give me this message when i try to start << asterisk : Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)>>>>

That message happens when you try to start an Asterisk CLI console, not when starting Asterisk proper.

Either Asterisk didn’t start (look at the logs for clues), or you have a file protection problem preventing access to the named pipe.

yes when i start Asterisk CLI console,how i can find the file protection

Did you try with asterisk -& and then rasterisk?

Asterisk detaches itself from the console (which is more complete than just going into background) when you run it with no options.

Sometimes it’s useful to capture the ouput of CLI on a text file (e.g. for debugging purposes), you could use this:

asterisk -r | tee asterisk-output.tx

script is usually a better way of capturing interactions to a file, as it looks like a terminal to the program, not like a pipe.

Normally, it happens because Asterisk service is not active, use this linux command to active asterisk service:
service asterisk start
then try again:
asterisk -vvvr
If something wrong went there, try to use “sudo” at the beginning.
hope that’s help.

service asterisk start didn’t work for me and said that service didn’t even exist, but after a short time (I logged out from the root user and then re-logged back in, but I’m not sure if it was the reason my problem was solved) and then service asterisk start worked fine.

Thanks for the reply. I had the same problem. I started the service with Asterisk & and then rasterisk. I got to the Asterisk CLI.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.