1.6.2 + Ubuntu = No consolse connection (RESOLVED)

I just upgraded to Asterisk 1.6.2 on a system running Ubuntu. Once the upgrade completed, I rebooted the box and attempted to access the console (asterisk -r). The connection was unsuccessful. The strange thing was that asterisk was running and able to process calls - I simply couldn’t connect to it using “asterisk -r”.

I subsequently discovered that Ubuntu deletes /var/run when the system is rebooted. Prior versions of Asterisk were able to create the directory /var/run/asterisk and populate that directory with asterisk.ctl and asterisk.pid. Well, apparently version 1.6.2 somehow lost that capability.

So, if you are using Ubuntu and plan on upgrading to 1.6.2, add a small script in your /etc/rc.local somewhere before asterisk starts up with the following:

mkdir /var/run/asterisk

If the /var/run/asterisk directory exists before asterisk starts, you will be able to connect.