/usr/sbin/asterisk -r: asterisk.ctl doesn't exist?

When I try to start asterisk in remote console by means of:
#/usr/sbin/asterisk -r
I get following reply: "Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)"
Asterisk, zaptel 1.2.9 on CentOS 4.2 with X100P card… what is to be done to bring up asterisk?
P.S. I also get a slew of error messages if I use any of the other parameters (-c, -vvvgc), errors doing with manager.conf, music on hold, res_mysql.c, etc., ending with failure to load module chan_oss.so…

Just make the folder named “asterisk” in /var/run your problem will be solved.

Unfortunately my friend, even with folder named “asterisk” in /var/run, the response to /usr/sbin/asterisk -r is the same…

edit /etc/asterisk/modules.conf and make sure the linenoload => chan_oss.so is there and not commented out.

then try running asterisk again.

hint: you need to watch the screen and look at the logs in /var/log/asterisk/full !!

In /etc/asterisk directory there is only one file: zapata.conf and no other files. Also, in the /var/log/asterisk there is a file event_log that cannot be opened and queue_log that has logs in the form of:
There is no file with the name “full” in that directory…

When you compiled Asterisk did you run “make samples”? I think there should be more then one file in the /etc/asterisk directory.

#/usr/sbin/asterisk -r
I get following reply: “Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)” [/quote]
asterisk -r connect You to running asterisk
error You get tells You that asterisk don’t run at all.
it’s hard to run asterisk without configs files (/etc/asterisk/ empty)

:blush: After running make samples and make config (and restarting comp after that) I got asterisk CLI
Thanks guys!

Glad you came right. Enjoy…

But wait, that’s not all… now when I dial to the phone line to which my asterisk system is hooked, I get the following warning from asterisk CLI:
WARNING[3206]: pbx.c:2357 __ast_pbx_run: Channel ‘Zap/1-1’ sent into invalid extension ‘s’ in context ‘default’ but no invalid handler.
And the call is not picked up. How to fix this?

I got the same issue with Nagios. The message says as “Unable to connect to asterisk.ctl, the file doesn’t exist”. After locating the file in the system (asterisk.ctl), follow the following steps and it worked;

chmod 777 asterisk.ctl
asterisk -rvvv
dialplan reload
SIP reload