Home Forums HAast (High Availability for Asterisk) Installation & Upgrade Asterisk won’t start, can’t connect to Asterisk console with ‘-r’ parameter Reply To: Asterisk won’t start, can’t connect to Asterisk console with ‘-r’ parameter

Avatar photoTelium Support Group
Participant
Post count: 262

The root cause of your problem is a regression (bug) in your Linux distro. There have been similar Linux regressions noted by Digium in the past (eg: https://issues.asterisk.org/jira/browse/ASTERISK-15603)

The solution is to use the HAAst event handler to create the missing directory for Asterisk, before Asterisk even starts.

Create the file /usr/local/haast/events/asterisk.start.pre with the following contents:


#!/bin/bash
If [ ! -d /var/run/asterisk ] ; then
mkdir /var/run/asterisk
chown asterisk:asterisk /var/run/asterisk
fi


and set the permissions on /usr/local/haast/events/asterisk.start.pre to 550:


chmod 550 /usr/local/haast/events/asterisk.start.pre

Note: The event handler system (including use of the asterisk.start.pre file) is restricted to the Commercial Unlimited edition of HAAst only.