[Home]

Summary:ASTERISK-12271: Failing registrations to peer via DNS name breaks all other peers
Reporter:Brad Belanger (btrain1227)Labels:
Date Opened:2008-06-27 16:05:24Date Closed:2011-06-07 14:03:10
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:A peer we register some DID's from via a DNS hostname for the peer went down today.  The DNS hostname was not resolvable either.  This failing registration caused all the end user SIP phones registered to the server to unregister.

Tried restarting, but the phones did not register.  After commenting the 'register => xxxx:xxxx@failed-peer-name.com/xxxx' lines and restarting the phones registered.

Console during issue:
[Jun 27 15:22:02] WARNING[1074]: chan_sip.c:2921 create_addr: No such host: failed-peer-name.com
[Jun 27 15:22:02] WARNING[1074]: chan_sip.c:7595 transmit_register: Probably a DNS error for registration to xxxx@failed-peer-name.com, trying REGISTER again (after 20 seconds)
[Jun 27 15:22:02] NOTICE[1074]: chan_sip.c:7517 sip_reg_timeout:    -- Registration for 'xxxx@failed-peer-name.com' timed out, trying again (Attempt ASTERISK-412)

****** ADDITIONAL INFORMATION ******

asterisk -rx 'core show locks'

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 3079695248 (do_monitor           started at [15834] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 15778 do_monitor &monlock 0xb63a20 (1)
=== -------------------------------------------------------------------
===
=======================================================================

asterisk -rx 'core show threads'
0xb7761b90 netconsole           started at [ 1018] asterisk.c listener()
0xb7815b90 netconsole           started at [ 1018] asterisk.c listener()
0xb779db90 autoservice_run      started at [  228] autoservice.c ast_autoservice_start()
0xb7851b90 monitor_sig_flags    started at [ 3096] asterisk.c main()
0xb788eb90 sound_thread         started at [ 1812] chan_oss.c store_config()
0xb78cab90 sound_thread         started at [ 1812] chan_oss.c store_config()
0xb7906b90 do_monitor           started at [15834] chan_sip.c restart_monitor()
0xb7942b90 do_monitor           started at [ 3543] chan_mgcp.c restart_monitor()
0xb797eb90 scan_thread          started at [  499] pbx_spool.c load_module()
0xb79bab90 do_monitor           started at [ 7016] chan_zap.c restart_monitor()
0xb79f6b90 pri_dchannel         started at [ 9532] chan_zap.c start_pri()
0xb7a32b90 do_monitor           started at [ 1130] chan_phone.c restart_monitor()
0xb7a6eb90 process_precache     started at [ 2193] pbx_dundi.c start_network_thread()
0xb7aaab90 network_thread       started at [ 2192] pbx_dundi.c start_network_thread()
0xb7ae6b90 device_state_thread  started at [ 4925] app_queue.c load_module()
0xb7b2cb90 network_thread       started at [ 9116] chan_iax2.c start_network_thread()
0xb7b68b90 sched_thread         started at [ 9115] chan_iax2.c start_network_thread()
0xb7ba4b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7be0b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7c1cb90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7c58b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7c94b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7cd0b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7d0cb90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7d48b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7d84b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7dc0b90 iax2_process_thread  started at [ 9105] chan_iax2.c start_network_thread()
0xb7e3db90 do_monitor           started at [ 4658] chan_skinny.c restart_monitor()
0xb7e79b90 accept_thread        started at [ 4844] chan_skinny.c reload_config()
0xb7eb5b90 do_parking_thread    started at [ 2476] res_features.c load_module()
0xb7ef1b90 do_devstate_changes  started at [  386] devicestate.c ast_device_state_engine_init()
0xb7f2db90 accept_thread        started at [ 3165] manager.c init_manager()
0xb7f69b90 listener             started at [ 1076] asterisk.c ast_makesocket()
33 threads listed.
Comments:By: Olle Johansson (oej) 2008-07-01 11:27:18

What if you have a local resolver on the machine? If you DNS server fails, a lot of strange things will happen at reload or restart of Asterisk.

By: Brad Belanger (btrain1227) 2008-07-01 11:34:58

In this case resolving other names was fine.  The authoritative DNS server for the peer's domain went unreachable.  So when the cache expired, lookups for the peer returned SERVFAIL from any resolver.

By: Terry Wilson (twilson) 2008-11-19 17:13:58.000-0600

I have tried reproducing this by putting in an invalid hostname in the register and haven't had any problems with unregistering phones (with Asterisk SVN-branch-1.4-r157503).  Do you know if this is still an issue for you, or should we close this out?

By: Brad Belanger (btrain1227) 2008-11-24 13:26:53.000-0600

I also tried reproducing the outage by adding a bad route to the DNS servers for a peer on my asterisk box and flushing the local resolver.  The peer went down as expected and the phones stayed up.  This is on 1.4.22.  Appears to work fine now.  Feel free to close.

By: Terry Wilson (twilson) 2008-11-24 13:29:39.000-0600

Closing as per reporter.