Asterisk AMI module is frozen

We are using asterisk for log time. recently we migrate from Ubuntu 14 to Debian 10. in Debian, sometimes, we encounter an unknow situation with AMI, that cause to freezing AMI connection, such as asterisk did not response to our application to AMI connection and Linux telnet connection (connection just froze without any error!!)
Even in the cli, after writing ‘manager show connected’, cli froze. This error just solve with restarting asterisk
After many considering I found there are 6 packet or byte waited in ‘Recv-Q’ of asterisk. and it seem asterisk have problem in reading those!!!
We met this error in asterisk 13.37 and 18.2.1

Here is some information:

root@PBX:~# netstat -nlpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        6      0  *               LISTEN      1024/asterisk

root@PBX:~# netstat -nat | grep 5038
tcp        6      0  *               LISTEN
tcp   1623624      0          ESTABLISHED
tcp      151      0         ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0      0         ESTABLISHED
tcp      152      0         CLOSE_WAIT
tcp        1      0         CLOSE_WAIT
tcp        1      0         CLOSE_WAIT
tcp   1911494      0          ESTABLISHED
tcp        0 2619320         ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0      0         ESTABLISHED
tcp        0      0          ESTABLISHED
tcp        0 2619320         ESTABLISHED
tcp        0      0         ESTABLISHED

PBX*CLI> manager show settings
Global Settings:
  Manager (AMI):             Yes
  Web Manager (AMI/HTTP):    No
  TCP Bindaddress: 
  HTTP Timeout (seconds):    60
  TLS Enable:                No
  TLS Bindaddress:           Disabled
  TLS Certfile:              asterisk.pem
  TLS Privatekey:
  TLS Cipher:
  Allow multiple login:      Yes
  Display connects:          Yes
  Timestamp events:          No
  Channel vars:
  Debug:                     No

PBX*CLI> module show like manager
Module                         Description                              Use Count  Status      Support Level                 Asterisk Manager Interface CDR Backend   0          Running              core                 Asterisk Manager Interface CEL Backend   0          Running              core
manager                        Asterisk Manager Interface               45         Running              core     Manager Device State Topic Forwarder     0          Running              core   Manager Presence State Topic Forwarder   0          Running              core
5 modules loaded

PBX*CLI> module unload manager
Unable to unload resource manager
Command 'module unload manager' failed.
[Sep 24 13:19:13] WARNING[17143]: loader.c:1251 ast_unload_resource: Soft unload failed, 'manager' has use count 45

Manager isn’t a module. You can’t unload it, it’s built in. You’d also need to be using an actually supported version of Asterisk, at which point if it can be reproduced then you could get a backtrace[1] to see where it is blocked. And there have been fixes for such things past the versions you mention.

[1] Getting a Backtrace - Asterisk Project - Asterisk Project Wiki

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