Author Topic: Asterisk crashing during calls  (Read 1872 times)

TJ

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Asterisk crashing during calls
« on: March 28, 2016, 03:49:39 AM »
Hi, we have an Askozia PBX server running within VMware ESXi fully up to date.  During some phone calls, the Asterisk processes appear to crash and restart which not only disconnects the in-progress calls, but also forces all the phones (being Snom 300's) to become deregistered.

The issue does not appear to be easily reproducible however is extremely frustrating, as the crashes appear to come in waves.

The Askozia PBX server has been up since it was last updated 44 days ago..

~ # uptime
 11:15:30 up 43 days, 23:55,  0 users,  load average: 0.00, 0.01, 0.04
~ #

..yet Asterisk suggests it has only been up for nearly 5 days which lines up with the last crash before the Easter long weekend.

askozia*CLI> core show uptime
System uptime: 4 days, 22 hours, 5 minutes, 34 seconds
Last reload: 1 minute, 53 seconds
askozia*CLI>

Any thoughts on how I can diagnose this further and ultimately fix the issue?  Thanks.

toxicfusion

  • Sr. Member
  • ****
  • Posts: 171
  • Karma: 6
    • View Profile
Re: Asterisk crashing during calls
« Reply #1 on: March 28, 2016, 08:43:59 PM »
What version are you running?

I find 4.1.5 to be very stable

Prior, 4.0.3 was my go-to.  All others had some quirks.

Markus Ehlers

  • Askozia Staff
  • Full Member
  • *
  • Posts: 87
  • Karma: 3
    • View Profile
Re: Asterisk crashing during calls
« Reply #2 on: March 29, 2016, 11:39:20 AM »
Hi TJ,

Is the system open to the internet without any firewall or Fail2Ban active? Do you have a lot of register requests in the logs?

If you want, please feel free to open a ticket at support.askozia.com and attach the output of the following Integrator Panel commands.

Please press "Esc" to enter the Integrator Panel. No enter the following commands and copy the output into text files.

Console - ps aux
Console - mount
Console - cat /proc/interrupts
Console - logread
Console - dmesg

AMI - sip show registries

Have a nice day! ;)

TJ

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Asterisk crashing during calls
« Reply #3 on: March 30, 2016, 08:18:24 AM »
Thanks for the quick replies toxicfusion and Markus.  The server itself has only been in since around December when we moved premises and for memory was already running 4.1.x when it went in.  It is currently running 4.1.5.

I am now waiting for it to crash again and will then open a support ticket and send all that output.  There is nothing special about the environment so I am a little confused as to why this issue appears to be so unique.

goseph

  • Hero Member
  • *****
  • Posts: 841
  • Karma: 35
    • View Profile
Re: Asterisk crashing during calls
« Reply #4 on: March 30, 2016, 10:59:02 AM »
There is nothing special about the environment so I am a little confused as to why this issue appears to be so unique.

Looks like there is something unique wrong, because usually those crashes don't happen  ;)

toxicfusion

  • Sr. Member
  • ****
  • Posts: 171
  • Karma: 6
    • View Profile
Re: Asterisk crashing during calls
« Reply #5 on: March 30, 2016, 02:53:02 PM »
Do you have the option Under  Advanced > Miscellaneous to "Restart Asterisk every night (waits until Asterisk has no calls in progress)"  enabled?

TJ

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Asterisk crashing during calls
« Reply #6 on: March 31, 2016, 07:11:53 AM »
The Asterisk processes crashed today so I have raised a support ticket (#10415) with the output requested by Markus.  Interestingly, this crash lines up with a sync of the system clock..

2016-03-31 13:00:01 ntpclient[13893]: Using server: 192.168.x.x
2016-03-31 13:00:03 ntpclient[13893]: Time set from remote server via settimeofday()
2016-03-31 13:00:03 ntpclient[13893]: Skew 2588.4mS, freq adjust 0
2016-03-31 13:00:03 asterisk[2525]: NOTICE[3076]: chan_sip.c:21828 in handle_response_peerpoke: Peer '104' is now Lagged. (2633ms / 2000ms)
2016-03-31 13:00:13 asterisk[2525]: NOTICE[3076]: chan_sip.c:21828 in handle_response_peerpoke: Peer '104' is now Reachable. (46ms / 2000ms)
2016-03-31 13:00:39 asterisk[13948]: NOTICE[13944]: dnsmgr.c:455 in do_reload: Managed DNS entries will be refreshed every 30 seconds.
2016-03-31 13:00:39 asterisk[13948]: NOTICE[13944]: cdr.c:1565 in do_reload: CDR simple logging enabled.
2016-03-31 13:00:39 asterisk[13948]: NOTICE[13944]: loader.c:1151 in load_modules: 74 modules will be loaded.
2016-03-31 13:00:39 asterisk[13948]: VERBOSE[13944]: chan_sip.c:31976 in load_module: SIP channel loading...
2016-03-31 13:00:39 asterisk[13948]: VERBOSE[13944]: tcptls.c:396 in __ssl_setup: SSL certificate ok
2016-03-31 13:00:39 asterisk[13948]: NOTICE[13944]: chan_skinny.c:7730 in config_load: Configuring skinny from skinny.conf
2016-03-31 13:00:39 asterisk[13948]: ERROR[13964]: tcptls.c:426 in ast_tcptls_client_start: Unable to connect SIP socket to 192.168.x.x:2675: Connection refused
2016-03-31 13:00:39 asterisk[13948]: ERROR[13980]: tcptls.c:426 in ast_tcptls_client_start: Unable to connect SIP socket to 192.168.x.x:4116: Connection refused
2016-03-31 13:00:39 asterisk[13948]: ERROR[13981]: tcptls.c:426 in ast_tcptls_client_start: Unable to connect SIP socket to 192.168.x.x:2719: Connection refused
2016-03-31 13:00:39 asterisk[13948]: NOTICE[13960]: chan_sip.c:21828 in handle_response_peerpoke: Peer 'SIP-PROVIDER-12811288885647ac179e900' is now Reachable. (13ms / 2000ms)
2016-03-31 13:00:43 asterisk[13948]: NOTICE[13960]: chan_sip.c:27749 in sip_poke_noanswer: Peer '104' is now UNREACHABLE!  Last qualify: 0
2016-03-31 13:00:43 asterisk[13948]: NOTICE[13960]: chan_sip.c:27749 in sip_poke_noanswer: Peer '102' is now UNREACHABLE!  Last qualify: 0
2016-03-31 13:00:43 asterisk[13948]: NOTICE[13960]: chan_sip.c:27749 in sip_poke_noanswer: Peer '103' is now UNREACHABLE!  Last qualify: 0
2016-03-31 13:00:48 asterisk[13948]: NOTICE[13982]: chan_sip.c:21828 in handle_response_peerpoke: Peer '102' is now Reachable. (33ms / 2000ms)
2016-03-31 13:00:48 asterisk[13948]: NOTICE[13983]: chan_sip.c:21828 in handle_response_peerpoke: Peer '103' is now Reachable. (49ms / 2000ms)
2016-03-31 13:00:49 asterisk[13948]: NOTICE[13984]: chan_sip.c:21828 in handle_response_peerpoke: Peer '104' is now Reachable. (59ms / 2000ms)

It may be unrelated, however it is not the only odd thing in the logs, there is also this, which appears but there are no times to line things up..

asterisk[2338]: segfault at 288a8764 ip 404446f6 sp badf1370 error 6 in res_srtp.so[4043b000+14000]
asterisk[2414]: segfault at 2888b31c ip 404446f6 sp ba7f1370 error 6 in res_srtp.so[4043b000+14000]
asterisk[2490]: segfault at 2889a2f8 ip 404446f6 sp badf1370 error 6 in res_srtp.so[4043b000+14000]
asterisk[13913]: segfault at 28903820 ip 404446f6 sp bb1ecbe0 error 6 in res_srtp.so[4043b000+14000]

I will wait for it to crash again and see what the output says.  As for the option to restart Asterisk every night, it is not checked - should it be?

toxicfusion

  • Sr. Member
  • ****
  • Posts: 171
  • Karma: 6
    • View Profile
Re: Asterisk crashing during calls
« Reply #7 on: April 06, 2016, 03:25:18 PM »
Did you manually set the SNTP server to of an internal server?

try to use a FQDN entry such as 'pool.ntp.org;