AMI randomly stops working

We’ve been using Asterisk AMI for years with no issues. Recently we spun up two new asterisk instances and are having issues with the AMI failing to work. It will suddenly stop working and stays down until an asterisk restart. It works as expected once asterisk is restarted.

Currently on the two servers AMI is down on one and up on the other. Asterisk is still fully functional aside from AMI from what I can tell.

(Working server):
telnet 127.0.0.1 5038
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.
Asterisk Call Manager/2.9.0

(Failed server):
telnet 127.0.0.1 5038
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.

The failed server is not presenting itself as ‘Asterisk Call Manager’ when attempting to telnet.

‘netstat -plnt’ on both has asterisk still listening on port 5038, the difference being the failed server has a number in the ‘Recv-Q’ column, succesfull server is 0.

I’ve tried ‘manager reload’ from the asterisk cli with no success.

Any suggestions or solutions are much appreciated.

In case anyone comes accross this in the future, this was a Centos7 install from source. We noticed later in the asterisk console logs at large volume there were file access issues, pipes couldn’t be opened, and a message saying adjust the ulimit. ‘ulimit -n’ produced 1024 by default on our Centos installs. Adding two lines to /etc/security/limits.conf :

* soft nofile 50000
* hard nofile 50000

and then rebooting increased the ulimit to 50000 open files instead of 1024, and the Asterisk Manager hasn’t stopped working since.

1 Like

If you use the standard CentOS startup, with safe_asterisk, it will set the ulimit for files to the maximum supported by the system, by default. This suggests you were not using the standard startup, or running safe_asterisk as non-root.

I think you meant “ulimit”, rather than “ulimin”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.