1

I am struggling with this error after an Elastix upgrade:

exit: 1 [FATAL] Unable to connect to Asterisk Manager from /var/lib/asterisk/bin/retrieve_conf, aborting

From what I can see the manager is running:

[root@elastix3 asterisk]# telnet localhost 5038
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
Asterisk Call Manager/1.1

By all indications the various Astersik Management Portal passwords should match up, in the /etc/amportal.conf, /etc/asterisk/manager.conf, and possibly in the GUI.

Selective output of /etc/amportal.conf:

AMPDBHOST=localhost
AMPDBENGINE=mysql
AMPDBUSER=asteriskuser
AMPDBPASS=My_Secret
AMPENGINE=asterisk
AMPMGRUSER=admin
AMPMGRPASS=My_Secret

Selective output of /etc/asterisk/manager.conf

[admin]
secret = My_Secret
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0,192.168.20.0/255.255.255.0

Image of Password Update success Image of password update

When I access FreePBX directly I also have an indication that there is no communication, see this screenshot:

enter image description here

But it's not correct, because Asterisk is online and working.

I would like some ideas on what to try next as I am at a complete loss. With regards to the botched upgrade, I have logged a separate Server Fault post here:

In summary when I did the upgrade Yum succeeded apart from a few packages.

Another anomaly of the upgrade is that I had to run amportal a ma install module_name for many different modules (one would have expected this to happen automatically).

Fixing the GUI is a priority but at least for now I suspect all is not lost because I think doing this command reloads the config in the command line: amportal module_admin reload

  • Sometimes in situations like this, the connection is done back to the host via a host name such as localhost. You might make sure that, that is intact in /etc/hosts. Also, this could potentially be a iptables issue, have you checked that? – Matt W May 08 '14 at 19:13
  • Hi, thanks for your comment. This situation was a right old mess and I ended up completely removing Elastix and FreePBX and then just reinstalling FreePBX. I've concluded that Elastix is too hard to upgrade due to the way it's packages are managed so in future I'll just be sticking to FreePBX. I need to have easily upgradable systems. – Eugene van der Merwe May 09 '14 at 02:15
  • 1
    FreePBX is perfect then. – Matt W May 09 '14 at 04:53

2 Answers2

3

This condition happens when ari or ampm passwords were recently changed and it contains some illegal characters that asterisk would not recognize like semicolons. It is safe to use passwords including letters, numbers and underscore. Just check /etc/asterisk/manager.conf and /var/www/html/recordings/includes/main.conf.php for passwords.

0

I had the same problem. Turned out that the /etc/asterisk/manager.conf file had the wrong entry for bindaddr. Changed it from bindaddr = MY.IPA.DDR.ESS to bindaddr = 127.0.0.1. After that, went into asterisk CLI with # asterisk -r and executed CLI> core reload, then exited out and did # amportal a r. After that, it worked.