Does /var/run/asterisk.ctl exist?

So there was someone else trying to configure Asterisk here and now when I try to connect to Asterisk CLI it gives me the error “Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)” But asterisk.ctl does exist. Anyone know what is wrong?

I suppose you must start asterisk first.
You can start asterisk:
asterisk (no parameters - this way it will start as daemon)
asterisk -c (with console (CLI))
asterisk -rc (to connect to running asterisk)
You can start once asterisk (as daemon).
Then you can connect to asterisk -rc
Or you can start asterisk -c, but killing console asterisk also will die.

it gives me the error:

[ Booting…
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Jan 9 09:04:19] ERROR[12036]: asterisk.c:3036 main: Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection. You have options:
1. You only have to compile DAHDI support into Asterisk if you need it. One option is to recompile without DAHDI support.
2. You only have to load DAHDI drivers if you want to take advantage of DAHDI services. One option is to unload DAHDI modules if you don’t need them.
3. If you need DAHDI services, you must correctly configure DAHDI.

Firsti you have to solve problem.
This mean - you must start asterisk with option -c
Or -cvvvvdddd
Doesnt matter how many v and d - verbose and debug, but no r and c is must.
This will guarantee that you see what happen and when asterisk die, or if everything is OK. Only after everything is OK - you can start asterisk without options and then connect to it.
From make menuselect - you should deselect DANDI - and see if it will be OK.

[quote=“bira_more”]Firsti you have to solve problem.
This mean - you must start asterisk with option -c
Or -cvvvvdddd
Doesnt matter how many v and d - verbose and debug, but no r and c is must.
This will guarantee that you see what happen and when asterisk die, or if everything is OK. Only after everything is OK - you can start asterisk without options and then connect to it.
From make menuselect - you should deselect DANDI - and see if it will be OK.[/quote]

Bria, I’ve done exactly what you’ve said me to do, but the error persist

He wasn’t trying to fix your problem; he was trying to make it easier to see the problem.

Your problem is not the headline problem of the .ctl file being missing. That simply indicates that Asterisk failed to start. Your actual problem is that you have a broken Dahdi configuration.

I don’t have any non-trivial DAHDI stuff.

As david55 mentioned - my advices were toward finding problems, and finding all modules which cause crash.
I suppose you use 1.6 - they switched from zaptel to dahdi.
You can try to forbid dahdi - in /ect/asterisk/modules.conf and try to start asterisk - to see if it is real problem.
Then - if you need dahdi - to find and fix problem.
I have no experience yet with 1.6

problem solved uninstaling asterisk and its modules and reinstalling