OpenWrt Forum Archive

Topic: DNS timeout issue / asterisk DNS lookup ?

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all !

I spent several hours, trying to find a way around a problem with dns lookup ... but no joy ...
Here is my problem.

#1 asterisk dns request.

Running an asterisk system with NO internet connection, asterisk get 'stuck' for 60 seconds (dns timeout ?) on startup ... I don't know exactly why it's doing a dns lookup and i tried to eliminate everything i could think that may 'trigger' it ... no success ... no matter what i try it gets stuck

Here is a display of asterisk traces with the exact location where it 'blocks' ...

+--------------+

== Parsing '/etc/asterisk/asterisk.conf': Parsing /etc/asterisk/asterisk.conf Found
  == Parsing '/etc/asterisk/extconfig.conf': Parsing /etc/asterisk/extconfig.conf Found
  == Parsing '/etc/asterisk/logger.conf': Parsing /etc/asterisk/logger.conf Found
Asterisk Event Logger Started /var/log/asterisk/event_log
Asterisk Dynamic Loader Starting:
  == Parsing '/etc/asterisk/modules.conf': Found
[Jan  1 00:40:44] NOTICE[2171]: loader.c:831 load_modules: 3 modules will be loaded.
  == Registered custom function IAXPEER
  == Registered application 'IAX2Provision'
  == Manager registered action IAXpeers
  == Manager registered action IAXnetstats
  == Parsing '/etc/asterisk/iax.conf': Found
  == Parsing '/etc/asterisk/iax_custom.conf': Found
  == Using TOS bits 16
  == Binding IAX2 to default address 0.0.0.0:4569
  == Parsing '/etc/asterisk/users.conf': Found
  == Registered channel type 'IAX2' (Inter Asterisk eXchange Driver (Ver 2))
  == 10 helper threaads started
  == IAX Ready and Listening
  == Parsing '/etc/asterisk/iaxprov.conf': Found
    -- Loaded provisioning template 'default'
chan_iax2.so => (Inter Asterisk eXchange (Ver 2))
  == Registered channel type 'Local' (Local Proxy Channel Driver)
chan_local.so => (Local Proxy Channel)
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/sip_custom.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found

It stops HERE ... for 60 secs. with an active connection UPD port 53 (DNS lookup ... ?)
Then it resume normally ...

== SIP Listening on 0.0.0.0:5060
  == Using SIP TOS: none
  == Parsing '/etc/asterisk/sip_notify.conf': Found
...

+===========================+

Any suggestion about the cause of this lookup and / or how to disable this ?
(Of course there are no registration nor anything that i see that could require a DNS lookup ... )

#2 As an alternative i thought of reducing dnsmasq dns lookup timeout ... but could not find how to do it ?
Anyone can tell me how to do this ?

P.S. I tried kill the dnsmasq process ... same result (maybe a shorter timeout ... but still very long ...)
... and everything else i could think of ...

Any suggestion would be appreciated ...


Noel

It could be that it tries to lookup its own hostname. Try to add the current hostname (OpenWrt?) to /etc/hosts and map it to 127.0.0.1

Hello jow !

Wow that was fast ! and RIGHT ON !
and guess what ...
I did modify the hostname and added the modified hostname to the /etc/host  file but it was ... misspelled ... :-(
As soon as i corrected and restarted ... no blocking ... asterisk starts and load in a short stretch !
Thank you so much for pointing that out ! VERY appreciated ... after many frustrating hours ! ?

Best ...

Noel

The discussion might have continued from here.