Home Forums HAast (High Availability for Asterisk) Configuration & Optimization HAAst can’t connect to Asterisk / AMI

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

    My new HAAst installation keeps promoting and demoting because it doesn’t think that Asterisk is running. I confirmed the Asterisk AMI is running:


    [root@pbx1texas:~] $ netstat -anp | grep 5038
    tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 31671/asterisk

    and I confirmed that the haast.conf file, in the [asterisk] section, is trying to connect to itself at the management IP address:


    [asterisk] ;=================================================================
    hostname = 192.168.1.44

    and I confirmed that is the local IP address:

    [root@pbx1texas:~] $ ifconfig
    eth0: flags=4163 mtu 1500
    inet 192.168.1.44 netmask 255.255.255.0 broadcast 192.168.1.255
    ether 00:21:43:f2:28:ac txqueuelen 1000 (Ethernet)
    RX packets 32396345 bytes 4993774309 (4.6 GiB)
    RX errors 0 dropped 24948 overruns 0 frame 0
    TX packets 37744901 bytes 21043799055 (19.5 GiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 16 memory 0xd0020000-d0040000

    Why can HAAst not find or talk to Asterisk?

    Avatar photoTelium Support Group
    Participant
    Post count: 265

    The answer can be found in your question above. Notice that the Asterisk server / AMI is listening on 127.0.0.1 ? That is a special address known as “localhost”

    You have configured HAAst to try to find the Asterisk server at 192.168.1.44. Even though that is the address of your PBX (actually the IPv4 address on one interface of your PBX), it is not the same as localhost. Localhost is a different interface, and is special in that it cannot be accessed from the network side (only from the LOCAL HOST side).

    So the AMI is listening on one interface, and HAAst is trying to connect to it on another, and that’s the problem. I recommend you modify your haast.conf file to connect to asterisk at “localhost” (the default), or its IPv4 equivalent 127.0.0.1

    You don’t mention if you are using pure Asterisk or a configuration generator, but you could alternatively modify manager.conf to tell Asterisk to listen on a different IP/interface. This is not normally recommended – but since you modified the haast.conf away from defaults I assume you might have had a reason to do so.

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