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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Avatar photoCustomer Inquiry
    Participant
    Post count: 203

    I have setup HAAst correctly and I see that HAAst attempts to start Asterisk. However, it appears that Asterisk fails to start. I have narrowed this down to a permissions issue, and Asterisk is unable to create the pid file in /var/run/asterisk/

    As a result I can’t connect to Asterisk using the ‘asterisk -r’ command, and the PBX doesn’t start (so HAAst fails over to the peer).

    I am running Debian 9 with Asterisk 14. I don’t use any configuration generator. How do I fix this?

    Avatar photoTelium Support Group
    Participant
    Post count: 265

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.