[Home]

Summary:ASTERISK-29041: manager: Logging in results in connection closure
Reporter:Dalius Mockevicius (Daliusm)Labels:
Date Opened:2020-08-24 08:48:55Date Closed:2020-09-22 12:00:01
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:16.12.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:CentOS Linux release 7.7.1908 (Core)Attachments:( 0) ami_notworking.pcap
( 1) ami_working.pcap
( 2) core-asterisk-running-2020-09-03T20-16-49+0300-brief.txt
( 3) core-asterisk-running-2020-09-03T20-16-49+0300-full.txt
( 4) core-asterisk-running-2020-09-03T20-16-49+0300-info.txt
( 5) core-asterisk-running-2020-09-03T20-16-49+0300-locks.txt
( 6) core-asterisk-running-2020-09-03T20-16-49+0300-thread1.txt
Description:Hello,
Sometimes Asterisk manager stops working and responding:

Normal behaviour on working:
{noformat}
root@host1 ~]# telnet 127.0.0.2 5038
Trying 127.0.0.2...
Connected to 127.0.0.2.
Escape character is '^]'.
Asterisk Call Manager/5.0.2
Action: Login
Username: random
Secret: random1234

Response: Error
Message: Authentication failed

Connection closed by foreign host.
{noformat}


Not normal behaviout on host2:
{noformat}
[root@host2~]# telnet 127.0.0.2 5038
Trying 127.0.0.2...
Connected to 127.0.0.2.
Escape character is '^]'.
Action: Login
Username: random
Secret: random1234
Connection closed by foreign host.
{noformat}

In host1 and host2 Asterisk version is same: 16.12.




Comments:By: Asterisk Team (asteriskteam) 2020-08-24 08:48:56.831-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2020-08-24 08:51:45.011-0500

Please provide the Asterisk console output. Does anything stand out? Is a connection limit reached?

By: Dalius Mockevicius (Daliusm) 2020-08-24 08:52:44.120-0500

I have attached 2 pcap files. There is simple connection and login with wrong password to localhost manager interface, one working and one - not

By: Dalius Mockevicius (Daliusm) 2020-08-24 09:30:40.189-0500

On working node console shows
{noformat}
<--- Examining AMI action: -->
Action: Login
Username: random
Secret: <redacted from logging>

[Aug 24 17:11:48] NOTICE[20222]: manager.c:3523 authenticate: 127.0.0.1 tried to authenticate with nonexistent user 'random'
[Aug 24 17:11:48] NOTICE[20222]: manager.c:3560 authenticate: 127.0.0.1 failed to authenticate as 'random'
<-- Examining AMI event: -->
Event: InvalidAccountID
Privilege: security,all
SequenceNumber: 20310
File: manager.c
Line: 1864
Func: manager_default_msg_cb
EventTV: 2020-08-24T17:11:48.400+0300
Severity: Error
Service: AMI
EventVersion: 1
AccountID: random
SessionID: 0x7f1b9614c380
LocalAddress: IPV4/TCP/0.0.0.0/5038
RemoteAddress: IPV4/TCP/127.0.0.1/56636
SessionTV: 1970-01-01T03:00:00.000+0300
{noformat}


On node there managed does not works it does not show my connection and that is strange

I think that connection limit is not reached.



By: Joshua C. Colp (jcolp) 2020-08-24 09:42:05.035-0500

We suspect that you have a deadlock occurring within Asterisk. Please follow the instructions on the wiki [1] for obtaining debug relevant to a deadlock. Once you have that information, attach it to the issue. Be sure the instructions are followed exactly as the debug may otherwise not be useful.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace#GettingaBacktrace-GettingInformationForADeadlock



By: Dalius Mockevicius (Daliusm) 2020-09-03 12:25:38.790-0500

Hello,
Today our Asterisk broke again.
I could not compile Asterisk with DEBUG_THREADS option because it was too much resource intensive and seriously impacted servers performance.

I have attached files from ast_coredumper output


By: Benjamin Keith Ford (bford) 2020-09-08 11:20:41.214-0500

The next time this happens, can you attach logs[1] that lead up to the failure? The locks file did not appear to show any held locks, so the problem is likely elsewhere.

[1]: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Asterisk Team (asteriskteam) 2020-09-22 12:00:00.826-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines